httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "software" <softw...@polin.it>
Subject [users@httpd] mod_dir trailing slash rewrite and ServerAlias
Date Fri, 29 Nov 2002 12:55:44 GMT
Hi!

A friend of mine is asking:

Here is the problem. With mod_dir enabled, when a request comes in for that is for a directory
withouth the trailing slash on the end, the requested url is rewritten with the slash appended.

Example:

www.domain.tld/foo
gets rewritten to

www.domain.tld/foo/

But, the problem is with ServerAliases. Example: 

<VirtualHost *>
  ServerName www.domain.com
  ServerAlias www.foobar.com
</VirtualHost>

The redirect gets written using the server name. So a request to:

www.foobar.com/foo

gets rewritten as

www.domain.com/foo/

What is the solution to making the rewrite use the HTTP_HOST rather than the server name?


Could you help me to answer to him ?

Thanks!


Mime
View raw message