Forum Moderators: phranque
as far as I understand, configuration options inside a virtual host statement shouldn't be influenced by one another.
However I have the following problem:
I have an old server being abandoned. The projects there are moved to a new one, one by one.
So I use mod_rewrite like this:
<VirtualHost 1.2.3.4:80>
...
RewriteEngine On
RewriteRule ^/(PROJ)(.*)$ [new.com...] [R,L]
</VirtualHost>
This works.
When I add a second directive for https for achieving the same behavior there, this seems to work as well. But in this case I get an error: "Redirect Limit exceeded" for all projects *not* matched by the rule.
I tried using RewriteCond limiting the rewrite to the relevant projects, but to no avail.
Any ideas?
It's just the same thing with another port/redirection:
<VirtualHost 1.2.3.4:443>
...
RewriteEngine On
RewriteRule ^/(PROJ)(.*)$ [new.com...] [R,L]
</VirtualHost>
I have to add, that mod_alias is used too, for the projects, that stay on the server, i.e.:
Alias /PROJ2STAY "/home/www/PROJ2STAY/html/"
From there it goes via index.php to another index.php in the main application directory, and from there to login.php.
When I take a look into the Rewrite log I can see, that the error occurs with "login.php". This is checked by the mod_rewrite-Rule over and over again, although the projectstring doesn't match the rule, what is shown correctly:
#*$!.xxx.xxx.xxx - - [21/Nov/2005:18:51:21 +0100] [www.xxx.xxx/sid#8187ca8][rid#819aa50/initial] (2) init rewrite engine with requested uri /PROJ2STAY
xxx.xxx.xxx.xxx - - [21/Nov/2005:18:51:21 +0100] [xxx.xxx.xxx/sid#8187ca8][rid#819aa50/initial] (3) applying pattern '^/(PROJ2GO-1¦PROJ2GO-2)(.*)$' to uri '/PROJ2STAY'
xxx.xxx.xxx.xxx - - [21/Nov/2005:18:51:21 +0100] [www.xxx.xxx/sid#8187ca8][rid#819aa50/initial] (1) pass through /PROJ2STAY
This is repeated for "/PROJ2STAY/", "PROJ2STAY/index.html" etc. until the loop with:
xxx.xxx.xxx.xxx - - [21/Nov/2005:18:51:21 +0100] [www.xxx.xxx/sid#8191a48][rid#819aa50/initial] (3) applying pattern '^/(PROJ2GO-1¦PROJ2GO-2)(.*)$' to uri '/APPDIR/login.php3'
xxx.xxx.xxx.xxx - - [21/Nov/2005:18:51:21 +0100] [www.xxx.xxx/sid#8191a48][rid#819aa50/initial] (1) pass through /APPDIR/login.php3
So I suppose something else is causing this. As all the index-stuff is done, it shouldn't be an issue of mod_dir. But what else?