Reputation: 34006
I need two things
I tried this but couldn't make it. Can you recommend the right code?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1/cakephp/$1 [R]
RewriteCond %{HTTP_HOST} ^127.0.0.1 [NC]
RewriteRule ^(.*)$ http://127.0.0.1/cakephp/$1 [L,R=301]
Upvotes: 0
Views: 98
Reputation: 4411
Try:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^127.0.0.1 [NC]
RewriteCond %{REQUEST_URI} !^cakephp(/.*)?$
RewriteRule ^(.*)$ /cakephp/$1 [R=301,NC,L]
Upvotes: 1