[Mediawiki-l] How to return HTTP 404 for a non-existent page?
Platonides
Platonides at gmail.com
Sun Apr 6 15:25:21 UTC 2008
Javier Valcarce García escribió:
> Some time ago, I ask this same question, the solution, given to me by
> Platonides, was to change a line in the source code of MediaWiki 1.10
>
> if ( 0 == $this->getID() ) {
> wfProfileOut( __METHOD__ );
> $wgOut->setStatusCode(404); // CHANGED
>
>
> Now, I have MediaWiki 1.12, What are the lines I must change now? Why
> not include permanently this feature in the main source code?
Just add the same line at the same place. That would be Article.php line 148
More information about the MediaWiki-l
mailing list