URL rewriting module for Apache web servers

learn more… | top users | synonyms (1)

1
vote
0answers
3 views

Can mod_rewrite [P]roxy to an HTTPS url when the inbound request URL is HTTP?

I have a host (IIS6, running an implementation of mod_rewrite for windows, by a co called Micronovae. It works well) that has a site at http://some.host.com I also have another host (on Microsoft ...
0
votes
2answers
34 views

Apache mod_rewrite : RewriteRule to pass requests tomcat application [duplicate]

I am having difficulty defining a correct RewriteRule to forward requests to an application running in tomcat. I have apache with mod_rewrite enabled as well as tomcat setup with an application ...
1
vote
0answers
13 views

Apache Rewrite of HTTPS on another specific port with hidden subdirectory [duplicate]

I have a Tomcat behind an Apache server and I would like to use the https request to be rewritten to the Tomcat on port 9001 with a hidden subfolder /test. hosts entry: 127.0.0.1 local.domain.com ...
1
vote
1answer
11 views

URL rewriting a specific directory

I want to rewrite the URL when receiving a request that is not a file and either for directory subdir or not a directory at all. E.g. (!file) && ( (subdir ) | ( !directory ) ) Here's my ...
2
votes
1answer
57 views

apache mod_rewrite variable hostnames with one redirect?

I have a test server (webtest.example.com) and a live server (www.example.com). I also have example.org, example.net, etc. I want those to redirect to example.com. I also want any non-www entries to ...
-1
votes
1answer
15 views

Domain keeps getting rewritten without mod_rewrite enabled

So essentially when I go to http://www.example.com OR http://example.com the URL gets rewritten to just www.example.com OR example.com dropping/removing the http:// part. I'm not sure why this is ...
0
votes
1answer
21 views

mod_rewrite in .htaccess and basic auth in vhost - access to paths

I want to lock down a website (made on Drupal) with basic auth. Drupal is using mod_rewrite in its .htaccess file. The problem I'm facing is this - my virtual host looks like this: <VirtualHost ...
1
vote
0answers
9 views

.htaccess redirect keeping url when there is wordpress code involved [duplicate]

I have two domains, alfa.com and beta.com. Beta.com points to alfa.com subdirectory named "ae" by following htaccess-file. It works fine, but what should I add to code to keep beta.com URL and not ...
-1
votes
1answer
23 views

How to set up htaccess to transfer from http to https? [duplicate]

This is my .htaccess - site does redirect to HTTPS but still gives: Your connection to the site is encrypted, but Google Chrome has detected mixed content on the page. How to avoid this? Thank you. ...
0
votes
0answers
23 views

How to rewrite request for subdirectories using apaches' mod_rewrite?

My document_root is /home/john/public_html. I need the URL example.com/subdir/index.php to be handled by the file /home/john/public_html/index.php. This is what I put in ...
0
votes
0answers
11 views

Apache config for AllowOverride All in .conf file in conf.d not working

I have setup an Amazon EC2 LAMP server running Apache v2.2.29. I've loaded mod_rewrite and am trying to modify the entry to AllowOverride All. Rather than edit the httpd.conf file in the ...
0
votes
1answer
33 views

Arch-linux apache 404 mod_rewrite VirtualHost with url suffix

I have a problem with Apache on Arch-Linux. I assume it is related to mod_rewrite, but I am not sure. In the past I always worked with Debian-based systems. Arch seems a little different. I have a ...
1
vote
0answers
21 views

Convertion of htaccess rewrite rule to nginx [closed]

Through searching the internet with "converting htaccess to nginx rule" I came up with anilcetin and winginx .htaccess to nginx converter which I doubt it doesn't correctly output what I need. Which ...
0
votes
0answers
16 views

wordpress rewrite mess with mod_jk [duplicate]

I would like to run a wordpress site under apache and then a subpath e.g. http://example.com/tomcat/ will be served under tomcat. I have [compiled the mod jk ]: ...
0
votes
0answers
19 views

Mod-rewrite with GET [duplicate]

I'm trying to get my htacces to rewrite URLS with GET parameters but hopelesly failing. I'd like for this: domain.com/landingpage?variableone=true&variable2=false to be converted to this: ...
0
votes
1answer
23 views

Chain rewrites of Apache requests for VirtualHost to another server in same network

Here is basically what I would like to do: http request comes in, portforwarding in router sends it to a server in the local network (server A) the server identifies the request for a virtual host ...
0
votes
0answers
25 views

simple conditional mod_rewrite for redirecting wrong urls

I have an assignment to add storeId parameter to wrong urls. It should behave like this: If url has directorystore/a in it like www.example.com/store/a - the next directory in path has to be ...
0
votes
0answers
19 views

Apache mod_rewrite to remove slashes is writing redirect using the filepath not a uri

Unfortunately I don't have direct access to this server so trial and error via a proxy person is proving difficult. We have the following Location directive (along with others) within a VirtualHost ...
-2
votes
2answers
40 views

What will happen if I force https for my image hosting site via .htaccess but embed an image with an http link? [closed]

I've built myself a small image hosting service for my own projects and I recently switched the site to https which works perfectly. Now I made a .htaccess file with a rewrite rule as described here ...
0
votes
1answer
18 views

mod_rewrite combine these two rules into one

I have two rules that currently function as they should, but I feel like they can be consolidated into one for the benefit of a smaller config to maintain and less rules to process for each HTTP ...
0
votes
2answers
36 views

ProxyPass only if file doesn't exist

I've seen this example: RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://app_cluster%{REQUEST_URI} [P,QSA,L] I need a similar thing that will delegate to ...
0
votes
0answers
31 views

Apache Redirect Inconsistency

I have a website and visitors visiting the website at www.example.com should be redirected to example.com. However, instead an "infinite loop" was generated. When I look closer, I notice something ...
0
votes
1answer
32 views

Apache mod_rewrite rules aren't triggering?

I have an archive of the Twitch Plays Pokemon Reddit updates on my server (http://flarn2006.dyndns.org/tppupdates/). Some of them include links of the format "/u/username", which is valid on Reddit, ...
1
vote
0answers
21 views

Apache rewrite rule for multiple named virtual hosts with a 'catch all' rule

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain. Basically any domain coming to this server gets ...
0
votes
1answer
73 views

Apache 404 returning 500 errors. Request exceeded redirects

I'm trying to setup a site with static HTML with Apache 2.2.22, but I'm getting a 500 error instead of 404. The message in the error log is: [Sun Dec 14 09:48:45 2014] [error] Request exceeded ...
4
votes
3answers
107 views

Block traffic behind AWS ELB

My web servers are behind ELB, I want to block traffic from some specific user agent which is a DDOS attack. Apache always see ip address of ELB as an end user so I tried below attempts: Blocking IP ...
0
votes
0answers
39 views

Rename file in apache

I maintain large files versioning on a server. Files are stored rewrited (hashed) on several folders, such as : For file test.avi : FOLDER1/aeriuyzekjshdfkjh FOLDER1/aeriuyzekjshdfkjh#1 For file ...
1
vote
0answers
40 views

Apache mod_rewrite rule to pass specific REQUEST_URI to specific html files

I have a very basic html presentation which I want to use Apache mod_rewrite to handle the URLs. home.html is just an intro page but I want this to be called when there is no REQUEST_URI ...
0
votes
0answers
27 views

301 redirect with mod-alias and mod-rewrite

my htaccess file has these lines: RewriteRule ^newlink ?do=something Redirect 301 /oldlink/ /newlink when i write http://www.example.com/oldlink/, browser redirects to ...
0
votes
1answer
32 views

How to get hostname into rewriterule [duplicate]

We've got a few subdomains setup, and I want to simplify some apache configuration - particularly as these particular subdomains are volatile. Anyway, I'm trying to get a rewrite rule that include the ...
1
vote
1answer
91 views

Does a wildcard subdomain (*.example.com) in Apache config also include the root (example.com)?

Does anything in an Apache config file (like ServerAlias, RewriteRule, ...) that has a wildcarded line like *.example.com also include the root example.com or do I have to separately add this ...
0
votes
1answer
42 views

Configuring a server-wide RewriteRule in conf-available

Lately I have been getting some referrer spam in my website's logs. In order to stop this (as it's quite annoying and also polluting my statistics), I want to block requests that are coming from ...
-1
votes
1answer
76 views

Excluding a directory from a root .htaccess rewrite rule to disallow from caching

On my lamp installation, I have in the root folder "/" (mydomain.org) a wordpress multisite with W3 total cache activated, I have also a sub_dir called "sub" (mydomain.org/sub) with a PHP script ...
0
votes
0answers
14 views

Rewrite condition on apache with ezpublish [duplicate]

I have a problem with setting up my rewrite rules on apache. I work on centos 6 with apache and ezpublish. I own the domain example.com and I have things set up like below: www.example.com/support ...
-1
votes
2answers
44 views

Strip part of URI with mod_rewrite [duplicate]

I have this rewrite rule to direct request to my symfony 2 application: RewriteCond %{REQUEST_URI} ^/foo/.*$ RewriteRule ^/foo(/.*)$ /srv/webapps/symfony2/web/app.php [QSA,L] ...
3
votes
1answer
46 views

Apache Reverse Proxy Unescapes URL

I am running Apache 2.2.15 as a reverse proxy in my DMZ. I have an application on the internal network that I make available on the Internet for staff to use by going through the reverse proxy. As ...
0
votes
1answer
57 views

Apache proxy to Glassfish - How to supress subfolder in URL?

I've got a single linux server running Apache/2.2.24 running both HTTP/HTTPS along with a Glassfish 3.1.2 server listening on port 8080. Glassfish runs a single deployed application which has ...
2
votes
1answer
68 views

Can Apache .htaccess convert the percent-encoding in encoded URIs from Win-1252 to UTF-8?

I want to add a directive in my .htaccess, such that if the browser is pointed at a URI containing %E4 (ä) - or any other special character - the .htaccess automatically rewrites %E4 (ä) as %C3%A4 ...
2
votes
1answer
133 views

Blocking all users without referrer BUT allowing Googlebot/bingbot at the same time (with .htaccess)

Because of some amateur-made DDOS attack on my website, I had to deny some traffic with .htaccess which worked fine. Unfortunately, it also blocks the googlebot/bingbot: order allow, deny deny from ...
0
votes
1answer
17 views

.htaccess entry to return simple text based on the URI

I have URL http://foo.com/bar?abc=123, what would be the correct entry in the htaccess file to return a simple text 200 status of abc=123? Basically, I just want to return the entire query string as ...
1
vote
0answers
26 views

Apache2 mod_rewrite, handling the optional “/” at the end of a URL

I am attempting to host a single custom page to set as my homepage on my server. The real path to the page is example.com/start.html. However, I do not want this ugly URL in my homepage so I am ...
0
votes
1answer
48 views

apache mod_rewrite scenario subdomain capturing from the http_host and passing it as subdomain to other url while rewriting it [duplicate]

i am trying to write two rewrite rules which are PASS THROUGH or PROXY so that i can hide the underlying url. Case1: When a request comes to app.domain.com/folder1/folder2/ it should go through ...
0
votes
1answer
19 views

Apache2 retrieve files from another folder when not found

While working on an application rewrite, I'd like to keep the old app webroot files as a fallback, when the new files are not found. There are 2 applications: <VirtualHost *:80> ServerName ...
0
votes
1answer
110 views

Force SSL for every URL except one path using .htaccess

I'm trying to enforce SSL for every URL except one with the first segment /preview. http://test.example.com/preview/blah/blah should be ignored by the rule; every other URL should be forced to use ...
0
votes
0answers
11 views

Rewrite old mediawiki URL pattern to short URL format and rewrite old URLs to support new format [duplicate]

We have been running a mediawiki installation for some years now. During an upgrade to a newer version, we decided to switch to the short url pattern wikipedia uses. This is working fine. So our ...
0
votes
0answers
10 views

wrong REQUEST_FILENAME if subfolder has the same name as the host

I got the following problem: I have a local wamp server with a virtualhost called admino. The needed vhost-info for that host is: <VirtualHost *:80> ServerAdmin arne@gmail.com DocumentRoot ...
0
votes
0answers
33 views

Apache rewrite isn't redirecting on ec2

I'm using Elastic Beanstalk with Amazon. I'm trying to setup Apache virtual host on the ec2 instance. No matter what I try, it doesn't seem to work. I'm using the following examples. ...
0
votes
1answer
258 views

Joomla URL Rewriting works automatically in Nginx

This is driving me nuts and I dont understand how this works automatically. I have nginx as my web server and I have installed Joomla that has URL Rewriting which removes the index.php from the URL. ...
0
votes
0answers
45 views

Apache Alias and Mod_Rewrite For WordPress?

I have a site that is running WordPress, anothersite.com, and I am trying to access that site through a different domain, mydomain.com. The goal is to have mydomain.com/anothersite act just like it ...
0
votes
1answer
27 views

Include more than one file in negative RewriteCond

I'm using this rule to ignore index.php in rewritte rule: RewriteRule ^((?!index\.php)[^/]+)/?$ galeria.php?nome=$1 [L,QSA,NC] But I need to include bio.php and contact.php in this rule. How can I ...