htaccess to change url
Posted
by
Guo Hong Lim
on Stack Overflow
See other posts from Stack Overflow
or by Guo Hong Lim
Published on 2012-09-23T15:25:46Z
Indexed on
2012/09/23
15:37 UTC
Read the original article
Hit count: 352
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.
© Stack Overflow or respective owner