Urban Giraffe Support | Redirection
TargetUrl removes * when redirecting
I am using Wordpress 2.6, Redirection 2.0.4 using the WordPress Module.
I an creating redirects in the form:
Method: 301
URL: /redirect/100
Target URL: http://www.externalsite.com/some/crazy*query/string/
When i enter http://www.myhdtvdeals.com/redirect/100 I am redirect to:
http://www.externalsite.com/some/crazyquery/string/ <- Note: The * or asterisk is removed from the TargetURL.
When i go back to the Redirection Admin interface and look at the TargetURL is correctly reads: http://www.externalsite.com/some/crazy*query/string/
Any ideas how I can keep the * in my TargetURL when the redirection is performed?
I tried to trace back through the code to find where the * is stripped out but I couldn't find it...
Thanks in advance! Otherwise a SUPERB plugin!
Responses
Posted 3 months ago by Key Master
Ok, I get what you mean now. After looking into this it seems that Redirection is not stripping anything. Instead it is the WordPress function
wp_sanitize_redirectinwp-includes/pluggable.phpthat is removing the*. You can fix this by changing this line:$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);Into:
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/\*:%]|i', '', $location);Reply
You must log in to post.