I have a query URL with query string and I want to convert it to folder structured URL.
For example:
http://localhost/index.php?page=about-us
http://localhost/index.php?page=contact-us
how would I covert it to
http://localhost/index/page/about-us
http://localhost/page/about-us
I know this ca开发者_JAVA技巧n be done with .htaccess. I just don't know where to start
You would need something along the lines of...
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^page/([-a-z-0-9]+)*/$ ./index.php?page=$1
RewriteRule ^index/page/([-a-z-0-9]+)*/$ ./index.php?page=$1
精彩评论