Hi
the url code is http://website.com/tag.html?tagging=beach now how can I rewrite this url to http://website.com/tag/beach.html
Thanks in advance. Dhvanit.
RewriteEngine on RewriteRule /tag/(.+).html$ /tag.html?tagging=$1
Thanks for the reply dagon but it still not work. URL call : http://movingannouncementstore.com/tag.html?tagging=beach It should be redirect to : http://movingannouncementstore.com/tag/beach.html
can you please look into following .htaccess file and guid me where i am wrong?
ErrorDocument 404 /index.php RewriteEngine On RewriteBase / RewriteRule tell_a_friend.html$ index.php?file=user/tell_a_friend RewriteCond %{HTTP_HOST} !movingannouncementstore.com$ [NC] RewriteRule (.*)$ http://movingannouncementstore.com/$1 [L,R=301] RewriteRule /tag/(.+).html$ /tag.html?tagging=$1
the rewrite rule above mine is in direct conflict and would be applied first. try removing everything to check the line by itself
In addition, dagon's rule is reversed. Try this:
RewriteCond %{HTTP_HOST} !^movingannouncementstore.com$ [NC] RewriteRule ^tag\.html\?tagging=(.*)$ /tag/$1\.html [L] RewriteRule ^(.*)$ http://movingannouncementstore.com/$1 [L,R=301]