I recently notice bad URLs coming from external sites to my site.
I get a lots of 404 not found from sites that reference my site using a bad link like:
My site - http://www.example.com/mypage/CachedOnTuesdays
My link should be: http://www.example.com/mypage/
I know I cannot ask them to fix it. Is there a way for me to remove the last part of the URL to display the correct page?
Use this:
RewriteEngine On
RewriteRule ^(.*)/CachedOnTuesdays$ http://www.example.com/$1 [R=301,NC,L]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With