PDA

View Full Version : Context Redirect that will remove the query string?


phallstrom
03-07-2007, 01:09 PM
Hi -

I've got a redirect and it works great except I don't want it to pass along the query string to the new location and I can't figure out how to stop it from doing it. I would like to keep it as an external redirect so search engines will update instead of continuing to hit these urls.

Here's the snippet from the configuration file:

<context>
<type>redirect</type>
<uri>exp: ^/multimedia/videos/id/([0-9]+)</uri>
<location>/tv/$1</location>
<externalRedirect>1</externalRedirect>
<statusCode>301</statusCode>
<note></note>
<allowOverride></allowOverride>
<realm></realm>
<authName></authName>
<required></required>
<accessControl>
<allow></allow>
<deny></deny>
</accessControl>
<authorizer></authorizer>
</context>

Is this possible?

mistwang
03-16-2007, 06:11 AM
you can try /tv/$1? for the <location>.