I have CakePHP based app on shared hosting I wonder if there's a way to clean up the url through .htaccess. What bugs me is that I have to have index.php in it or I get a 404:
Initially I was getting a 404 error no matter what and my host admin ended up setting RewriteEngine off and this is what it looks like now
<IfModule mod_rewrite.c> RewriteEngine off RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule>
Is there fix for this without the .htaccess? As it is right now, does it pose any type of security risk?
htaccess for www-only redirection
.htaccess redirect problem
Redirect 301 & Mod Rewrite Issues
htaccess redirect question
These directives file would rewrite URLs to project.com/webroot/, which doesn't exist.
URL rewrite issues using .htaccess
It should redirect to project.com/app/webroot/, which will in turn rewrite to index.php?url=$1 (relative to project.com/app/webroot/)..
.htaccess redirect all files in one folder to exact same in another folder
I'm not pasting the files here; the three of them are available in the CakePHP releases as well as in the Book: http://book.cakephp.org/2.0/en/installation/url-rewriting.html (check the 3rd item in the page)..
.htaccess, proper rewriting of directory and file with same name
mod_rewrite send everything not matched to a rewritemap