Welcome to WebmasterWorld Guest from 107.21.159.218

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

RedirectMatch and Dump Query Strings

     

jk3210

3:39 am on Jul 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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?

g1smd

6:27 am on Jul 17, 2012 (gmt 0)

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



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.

jk3210

1:34 pm on Jul 17, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got it. Thanks g1smd.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month