Reputation: 5676
How can I convert this url
http://localhost/cms/index.php?page=register
to this
http://localhost/cms/page/register.html
Please help... I'm not that good in htaccess.
Upvotes: 1
Views: 147
Reputation: 1999
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... :)
Upvotes: 2
Reputation: 36681
Try This
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^cms/([0-9]+)-([a-z]+) http://localhost/cms/index.php?page=$1-$2 [NC]
Upvotes: 0