httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] ServerAlias and redirecting, please help
Date Wed, 02 May 2007 13:40:53 GMT
On 5/2/07, Dmitry Hazin <dhazin@gmail.com> wrote:
> Yes, that was my mistake. Anyway, without that line it didn't work too :(
> It seems that apache doesn't read RewriteRule directive after it had
> read ServerAlias one..

No, that's not true. As I said, if you want to debug mod_rewite you
need to use the RewriteLog. It could also simply be a question of not
putting the directives in the right place. They should be placed
inside the <VirtualHost> where you want them to have an effect.

> What do you mean "the technique of having two <VirtualHost>s"?
> We do have 2 virtualhosts: one for www.site.com and one for www.site.ru
> Do you suppose putting redirect directive into the www.site.com one or what?
> And what to do with ServerAlias then?

I mean that at this reference
http://wiki.apache.org/httpd/Recipes/CanonicalHostNames
there are two techniques for canonicalizing urls. You chose to use the
second one rather than the first one, which I find simpler.

To use <VirtualHost>s, you simply setup a separate <VirtualHost>
section (with appropriate ServerName) for each hostname that you wish
to treat differently. The VirtualHost for xx.site.com would contain
nothing other than a ServerName and a Redirect pointing to the
appropriate location on www.site.ru.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message