Recently i have been using stackoverflow to fix many of my server errors. Recently i have encountered the following error “NOT FOUND 404 error” for the following error.
I have seen from web master central that there are several hundred urls have trailing string “%20target=” I want to remove so that the url yield results.
here is the sample. i wanted to change the following url from
http://www.example.com/one/two/three/four/five/For-Sale-26264.html%20target=
to
http://www.example.com/one/two/three/four/five/For-Sale-26264.html
How can i achieve this using htaccess
The
%20is actually a URL encoded space, so you can use a lazy select(.+?)to match as few characters as possible before the space with\sand thentarget. The grouped match is available as a back reference with$1for the rewrite.