Remove someone else's website URL (which contains forward slashes) via .htaccess on WordPress -
i've searched high , low solution , i've tried has failed. looking through our server logs , noticed number of 404s url has had variable added end of (for reasons we're still trying understand).
a url should read:
www.example.com/property1/property2/
instead reads:
www.example.com/property1/property2/http:/www.anothersite.com/ (notice single slash after 'http:')
i tried using both:
rewriterule ^/http:/www.anothersite.com/(.*)$ /$1 [l,qsa]
, rewriterule ^/http:/$ /
but no avail. added complication site wordpress, i've been placing new code on line after rewritebase /
of code (standard wp):
# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress
any assistance appreciated! :)
use following rewrite rule
rewriterule ^(.*)/http:.*$ $1 [l,nc,qsa,r=301]
assuming want www.example.com/property1/property2/http:/www.anothersite.com/
redirected www.example.com/property1/property2
. use following end url /
rewriterule ^(.*/)http:.*$ $1 [l,nc,qsa,r=301]
Comments
Post a Comment