htaccess redirect remove /app/webroot in cakephp
I have an htaccess file that I want to redirect the all pages to the another folder. I am using cakephp for the site, except for this folder which I want to redirect.
"/app/webroot/" is added to the new directory so the url is /app/webroot/new/ instead of just new.
I am placing this htaccess file (below) in the "new" directory and want anything at /app/webroot/new/ to redirect to /new/ and remove the /app/webroot/ This folder is independent of cakephp and thus does not need to be processed by cake.
The code below loops and I am not sure why.
Options +FollowSymlinks RewriteEngine On RewriteBase /new/ # If your concerned about direct access to a particular page withou开发者_如何转开发t the sub-dir # you will want to add something like this RewriteCond %{REQUEST_URI} !^/new RewriteRule (.*) /new/$1 [R=301,L,NC]
You should NOT place the .htaccess file in /new/
but in /app/webroot/new/
.
精彩评论