Welcome to WebmasterWorld Guest from 54.146.5.196

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Removing Query String After the Redirect. 90% done with RewriteRule

Any Idea's how to remove the Query String when using a rewriterule?

     
6:20 pm on Jul 14, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Aug 25, 2008
posts:88
votes: 0


Hey Guys.

Need to redirect old links that use the ?p=stuff in google.

I got this much.

RewriteCond %{QUERY_STRING} ^p=plumb_supply
RewriteRule ^ http://www.example.com/plumbing_supply.htm? [QSA,R=301,L]

but it makes the URL

http://www.example.com/plumbing_supply.htm?&p=plumb_supply

Any Idea's how to remove the Query String? I thought that is what the QSA did?

[edited by: jdMorgan at 2:44 am (utc) on Jul 15, 2010]
[edit reason] Added code tags & changed to example.com to avoid auto-linking [/edit]

7:32 pm on July 14, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


QSA appends it.

A question mark on the end of the target URL will clear the query string.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members