Forum Moderators: phranque

Message Too Old, No Replies

ModRewrite with changing dynamic URLs

ModRewrite in Apache

         

ryanrbftp

10:12 am on Oct 7, 2009 (gmt 0)

10+ Year Member



Hi Guys, I'm looking for a mod rewrite redirect rule for the following.

Redirect this:

http://example.com/modules.php?name=My_eGallery

To This:

http://example.com/modules.php?name=Images

I also want to redirect queries following that, for example I also want to redirect:

http://example.com/modules.php?name=My_eGallery&do=showpic&pid=5057

To This:

http://example.com/modules.php?name=Images&do=showpic&pid=5057

I've searched high and low, and most examples online only take one query into consideration.

Thank you for your help.

[edited by: jdMorgan at 12:52 pm (utc) on Oct. 7, 2009]
[edit reason] Please use example.com. See TOS, [/edit]

jdMorgan

12:53 pm on Oct 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're likely not going to find a piece of code that does exactly what you want, and if you do, how can you be sure that it is correct in every detail?

Our charter prohibits us from writing your code for you -- We simply don't have the resources here to provide such a "service," and we likely never will. However, we can help with very specific problems and specific questions.

So please take a look at the resources cited in our Apache Forum Charter, and then post your best-effort code as a basis for discussion.

For each of the two required rules, you will need a RewriteCond to test and create back-references to your query string.

Thanks,
Jim