I have the CakePHP simple program ( CakePHP: version 2.1.3, Centos 6.x and Apache: 2.2.15).
Now I want to change url from: http://domain.com/frontend/login
to new url like: http://domain.com/user-login.html
I want to use new URL, and remove old URL.
I tried to rewrite ( by config .htaccess with mod rewrite, I configed /etc/httpd/conf/httpd.conf already: Change AllowOverride None to AllowOverride All).
and some .htaccess files like belows:
/root/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
#rewrite to new url
RewriteRule ^frontend/login$ user-login.html [L]
</IfModule>
/root/app/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
and /root/app/webroot/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
But my new url http://domain.com/user-login.html is not work.
There is any thing wrong in my config?