Ad

Rewrite From Home.php To Home

- 1 answer

I need to rewrite this url:

www.example.com/home.php to www.example.com/home

I write this code in the .htaccess but doesn't work:

RewriteEngine on
RewriteRule ^home$ $home.php [nc]

why ?

Ad

Answer

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\$ home.php [nc]

SHOULD work. Did not test.

Ad
source: stackoverflow.com
Ad