[Techtalk] Mod Rewrite rules

Wim De Smet kromagg at gmail.com
Mon Sep 21 13:07:15 UTC 2009


Hi,

On Sun, Sep 13, 2009 at 8:33 AM, Michelle Murrain <michelle at murrain.net> wrote:
> One thing remains. The main page of the blog is at domain1.com/blog. I
> would like to redirect "domain2.com/" (and only that - no other pages
> below it) to point to /blog
>
> This is what I've got so far in my .htaccess file:
>
>   RewriteCond %{HTTP_HOST} ^domain2.com$
>   RewriteCond %{REQUEST_URI} =/
>   RewriteRule ^/$ /blog/
>
> Alas, this doesn't work.

Did you ever get this to work? It just occurred to me that you might
want to rewrite /index.html? as well. Seeing as the browser might
default to those (though I'm not entirely sure which he triest first,
I think he only tries them if he gets a 404 on /).

regards,
Wim


More information about the Techtalk mailing list