Forum Moderators: phranque
I have set below syntaxt in my site
Options +FollowSymLinks
RewriteEngine on
RewriteRule pictures/(.*)/ pictures.php?gallery=$1
enter above syntax in .htaccess file we convert
[mysite.com...] to url
[mysite.com...]
but somebody enter directly first one like
[mysite.com...]
so, my requirement is if anybody type "pictures.php?gallery=4" then automatic convert /pictures/4/
Please help me
Thanks in Advance
Rajnesh
There are hundreds of prior examples of how to do that here in this forum.
The redirect has similar syntax to the rewrite, except the redirect will also include the target domain and [R=301] in the rule.
You'll likely need a RewriteCond on each one to stop any sort of infinite loop occurring too.
Jim