htaccess to change url
- by Guo Hong Lim
I have the following code in my .htacess but it didn't work right. Is it because mod-rewrite is no "on", if so, how can i check?
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\$ $1.php [nc]
I wanted to rename my address, example:
http://www.abc.com - http://www.abc.com
http://abc.com - http://www.abc.com
http://www.abc.com/123.html - http://www.abc.com/123
http://www.abc.com/12-12-12.html - http://www.abc.com/12-12-12
http://subdomain.abc.com/123.html - http://subdomain.abc.com/123
Basically removing the extension and ensuring that its www is intact.