Forum: Bad URLs

Started by WAS, March 08, 2018, 04:32:09 pm

Previous topic - Next topic


March 08, 2018, 04:32:09 pm Last Edit: March 08, 2018, 05:22:51 pm by WASasquatch
Most of the links on Google are dead, but are not being removed because there is a Status 200 (OK) page being served as a 404 page. Instead of Status 404 (Bad Request).

Could you please update the 404 page to either serve correctly as a error page, or add a mod_rewrite rule to fix the bad links? Something like RewriteEngine On
RewriteBase /
RewriteRule ^?([A-Za-z0-9-_]+)=([A-Za-z0-9-_]+)$ /index.php?$1=$2
could possibly work, though untested.

Additionally adding <meta name="robots" content="noindex, noarchive" /> to your 404 will help robots.

If you can support PHP, or the page is served via PHP a simple http_response_code(404); before any other headers are sent will correct the error page. Assuming it's not dynamically served by apache/nginx.