-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

Stewie
  • 537
  • 2
  • 7
  • 17

1 Answers1

0

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

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

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