I need two things
- Redirect all requests from http://127.0.0.1 to http://127.0.0.1/cakephp
- Redirect all requests from http://127.0.0.1/somefolder/someaction to http://127.0.0.1/cakephp/somefolder/someaction
- Do nothing if request is to this page http://127.0.0.1/cakephp
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]