Forum Moderators: phranque

Message Too Old, No Replies

How to exclude specific parameter from query string

exclude paramter from querystring using mod rewrite

         

wasimansha

10:26 am on Mar 9, 2010 (gmt 0)

10+ Year Member



First! i am glad to be the part of this professional world.
I have this issue , could probably be very easy to fix, but i have been hunting for the solution for past 2 days and couldn’t find one that exactly matches my requirement.
I want one specific kind of dynamic url to be rewritten without couple of parameters included in querystring. For example the current url is:

www.mysite.com/detail.php?cid=40&catname=Blue&pid=987&name=Hat

and i want it to be re written using RewriteRule TO:

www.mysite.com/Blue/Hat.html

if someone nice could help me out in here that would be really taking me back to life :)

thanks

g1smd

11:38 am on Mar 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Please check recent threads as this has been discussed several times already this week.

It's the second most popular question in this forum, with several thousand prior examples.

It's a three step process, also outlined in the threads linked from the forum charter.

wasimansha

2:17 pm on Mar 9, 2010 (gmt 0)

10+ Year Member



I have searched and searched but again no luck.Sorry if i am being so dumb here.But can you please insert the link specific to the thread that would be great.OR as a favor if you could write me down the steps.
I was also wondering if i can exclude the parameters and use (/)or (-) or (+) in place of ID's , than it would be ...

www.mysite.com "/=(cid)" Blue"/=(pid)"Hat.html will become
www.mysite.com/Blue/Hat.html

thanks

jdMorgan

7:34 pm on Mar 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi wasimansha, and Welcome to WebmasterWorld!

Please see the thread Changing Dynamic URLs to Static URLs [webmasterworld.com] in our Apache Forum Library as a good place to start. That thread will clarify some of your understanding of this problem, and make it easier for you both to describe the problem accurately enough to get help, and to take steps toward fixing it.

Also useful are the documentation and turorials cited in our Apache Forum Charter, other Library threads, and the WebmasterWorld site-search function.

Jim

wasimansha

6:22 am on Mar 15, 2010 (gmt 0)

10+ Year Member



thanks alot Jim, will definitely have a look :)