Prince Prince - 3 months ago 9x
PHP Question

URL rewriting: Change to

I am working with

and I want to change this url
to this
so wrote the following code:

RewriteEngine on
RewriteRule home index.php

When I go to
it works but when I go to
the url does not change to

How can I solve this problem, please ?


Try :

RewriteEngine on
#externally redirect "/index.php" to "/home"
RewriteCond %{THE_REQUEST} /index\.php
RewriteRule ^ /home [L,R]
#internally map "/home" back to "/index.php"
RewriteRule home index.php