Ok, I tried your method and it worked fine for me! I don't think that
I need to spend much time debugging rewriterules so I will stay with
it.
Thanks in advance!

2007/5/2, Joshua Slive <[EMAIL PROTECTED]>:
On 5/2/07, Dmitry Hazin <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to