Hi Guys, I'm looking for a mod rewrite redirect rule for the following. Redirect this: http://flyawaysimulation.com/modules.php?name=My_eGallery Code (markup): To This: http://flyawaysimulation.com/modules.php?name=Images Code (markup): I also want to redirect queries following that, for example I also want to redirect: http://flyawaysimulation.com/modules.php?name=My_eGallery&do=showpic&pid=5057 Code (markup): To This: http://flyawaysimulation.com/modules.php?name=Images&do=showpic&pid=5057 Code (markup): I've searched high and low, and most examples online only take one query into consideration. Thank you for your help.
RewriteCond %{QUERY_STRING} ^name=My_eGallery(&.*)?$ RewriteRule ^modules\.php$ /modules.php?name=Images%1 [R=301,L] Code (markup):
That works like a charm, I had something very similar to that but couldn't seem to get it working... I was using $1 instead of %1 I think... Thank you for your help, really appreciated. We also have the following: http://flyawaysimulation.com/modules.php?op=modload&name=My_eGallery&file=index&do=showpic&pid=4354 Code (markup): That needs redirecting to: http://flyawaysimulation.com/modules.php?name=Images&do=showpic&pid=4354 Code (markup): What would the code be? Thank you again.