You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2004/08/21 17:03:37 UTC

DO NOT REPLY [Bug 30784] New: - mod_dir and mod_rewrite ServerName instead of ServerAlias for redirection

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30784>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30784

mod_dir and mod_rewrite ServerName instead of  ServerAlias for redirection

           Summary: mod_dir and mod_rewrite ServerName instead of
                    ServerAlias for redirection
           Product: Apache httpd-1.3
           Version: 1.3.31
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other mods
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: donguana@hotmail.com


Using a virtual host configured as the following.

DirectoryIndex index.html index.htm 
<VirtualHost *:80>
    DocumentRoot /htdocs
    ServerName test.example.com
    ServerAlias test1.example.com test2.example.com test3.example.com
</VirtualHost>

If I go to http://test1.example.com I get an automatic redirect to
http://test1.example.com/

If I go to http://test1.example.com/test/ and there is an index.html file within
the test folder I get the contents of the file with no redirect.

If I go to http://test1.example.com/test (no "/") and there is an index.html
file within the test folder I get an automatic redirect to
http://test.example.com/test/. Note that with this test I got switched from
test1 to test server!!!

In our case we are using test1 to go directly to the server and test is a
generic load balanced server and we don't control which server we will be
landing on. So if we place a new file on test1 for testing and we don't place
the "/" in the url we get redirected to the load balanced server which can place
us on another server which will generate and error because the file does not
exists.  

I have testing this issue with the "DirectoryIndex" from mod_dir and the
mod_rewrite with the [R] option and I get the same results.

The only work arround I know of at this time is to remove the ServerAlias and
create multiple virtualhost.... - This is not as clean...

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org