i’m trying to set up a very simple rule in .htaccess file in order to rewrite this kind of url: http://www.domain.com/index.php?page=test to this: http://www.domain.com/test
I’m newbie to mod_rewrite, and so far, i came to this rule
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
but it doesn’t work.
Any help?
Thanks a lot
Almost right, you just forgot the
page=:Now note that this rule does the exact opposite: It rewrites requests of paths like
/testinternally to/index.php?page=testand not vice versa.