News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Is there a way to disable specific URL

Started by diontoradan, November 03, 2014, 04:51:05 AM

Previous topic - Next topic

diontoradan

Im having trouble with adsense which disabled my adserving because some spammers posted sexual content.
So i removed the post, but still adsense not enabled, they say the page still there, and my site still not compliance with the rules.
It turns out that the "missing post / invalid link" page is still considered as a page.

So i have an i idea to delete the link / prettyurl altogether to a 404 not found page.
it can be done in htaccess but i don't know how to. i've search the internet no solutions.

so can i redirrect the specific  pretty url to 404 page ?

if there any other solution please share

margarett

You need to ask that question in the MOD's support topic ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

This would be considerably easier if the fatal error page ever actually set an HTTP status that wasn't 200 OK. I think Oldiesmann fixed this in 2.1 though I might have to make it a mod for 2.0 at some point, since it does have actual SEO benefits.

Might do that as a warm up exercise while my dev machine is out of action and I'm working on a borrowed laptop :P

dougiefresh

I wrote a short mod called HTML 404 Status Error with Fatal Error that does just this.  It hasn't been approved yet, as I literally just submitted it to the Customization Site....

diontoradan


Arantor

Quote from: dougiefresh on November 03, 2014, 03:52:59 PM
I wrote a short mod called HTML 404 Status Error with Fatal Error that does just this.  It hasn't been approved yet, as I literally just submitted it to the Customization Site....

Not all errors should 404.

dougiefresh


Arantor

Yeah, that's where it gets awkward.

As per specification, 404 is a page that is not found - that by definition 'may return'. For something that is gone and will never return, 410 Gone should be issued instead.

Meanwhile, there's the fun of 403 for errors relating to insufficient permissions. (Technically, a variant of 401 would be semantically correct but since none of the 401 directives are supported or sane, we fall back to the definition of 403 for 'this page is not accessible and authentication probably wouldn't help anyway')

HTTP is evil. At least HTTP 418 is fun.

Advertisement: