homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Removing Query String After the Redirect. 90% done with RewriteRule
Any Idea's how to remove the Query String when using a rewriterule?
acimag




msg:4170136
 6:20 pm on Jul 14, 2010 (gmt 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]

 

g1smd




msg:4170159
 7:32 pm on Jul 14, 2010 (gmt 0)

QSA appends it.

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved