-1

I am trying to redirect toast.allthesmarts.com to toast.allthesmarts.com/dayone

RewriteEngine on

RewriteCond %{HTTP_HOST} toast.allthesmarts.com
RewriteRule  ^(.*)$ http://toast.allthesmarts.com/dayone/ [L,R,QSA]

But this gives me infinite loop. I tried this:

    RewriteCond %{HTTP_HOST}   ^toast.allthesmarts.com$
    RewriteCond %{REQUEST_URI} !^/dayone$
    RewriteRule  ^(.*)$ http://toast.allthesmarts.com/dayone/ [L,R,QSA]

But it doesn't work ! I have done this many times, but my head is not working today ! Please help

note: there are other websites running via same apache

2
  • vote to close, really ? I would love to know why.
    – Stewie
    May 8, 2013 at 21:11
  • Where is this rule? In the config, or in a .htaccess file? Anyway, since you are rewriting everything to /dayone/ except for /dayone you do in deed get in a loop... May 8, 2013 at 21:28

1 Answer 1

0

Change 'RewriteCond %{REQUEST_URI} !^/dayone$'

To 'RewriteCond %{REQUEST_URI} !^/dayone/$'

1
  • thanks that worked. It didn't load any assets though. SO I modified it like this: 'RewriteCond %{REQUEST_URI} !^/dayone(.*)$'
    – Stewie
    May 8, 2013 at 22:52

Not the answer you're looking for? Browse other questions tagged .