clean url for htaccess
How can I convert this url
http://loc开发者_JS百科alhost/cms/index.php?page=register
to this
http://localhost/cms/page/register.html
Please help... I'm not that good in htaccess.
Try this to make it work like you wish: :)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} \/cms\/index\.php
RewriteCond %{QUERY_STRING} page\=(.*)
RewriteRule (.*)$ /cms/page/%1.html
Let me know in case of any issue... :)
Try This
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^cms/([0-9]+)-([a-z]+) http://localhost/cms/index.php?page=$1-$2 [NC]
精彩评论