Forum Moderators: coopster

Message Too Old, No Replies

redirectin /%20

is this possible

         

nippi

10:20 pm on Feb 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



occasionally, people link into my site with anchors I have not been able to succesfully redirect

eg

1. %20
2 [mydomain...]

the sites do not repsond to requests to fix the links.

is there anyway I can 301 these to home in .htaccess?

g1smd

11:40 pm on Feb 6, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, and it is far simpler to fix these using a RewriteRule in your .htaccess file than to attempt to do so using PHP.

In order to fix them in PHP, the request has to resolve to an internal script file first, and with the %20 included, is unlikely to do so.

mromero

11:46 pm on Feb 6, 2011 (gmt 0)

10+ Year Member



I have a problem where some sites link to us with:

http://www.example.com/%20%20%20

How can we fix this in htaccess

I've tried 301 but I may be missing something in the syntax. Our page is not PHP - static html