| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|RedirectMatch and Dump Query Strings|
| 3:39 am on Jul 17, 2012 (gmt 0)|
I'm trying to redirect everything in the "foo" directory and below, to a file. This works...
redirectMatch 301 ^/foo/ http://www.example.com/filename/
...except it also appends any query strings found in "/foo/" to "/filename/"...which results in "/filename/?=true" not just /filename/.
How do I make sure any query strings get stripped from the redirect?
| 6:27 am on Jul 17, 2012 (gmt 0)|
Use a RewriteRule instead and add a question mark to the end of the target URL.
Convert all of your rules that use Redirect or RedirectMatch to instead use RewriteRule.
| 1:34 pm on Jul 17, 2012 (gmt 0)|
Got it. Thanks g1smd.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved