Permalink
Browse files

Do not return 300 Multiple Files if no file

Prior to this change, if a close match to the filename couldn't be found, Apache would return a 300 and display around 50 links that were allegedly quite similar to the one you'd been looking for. This wasn't helpful and looks bad. I'd prefer a 404 for a file not found.

I've set this in the mediawiki directory rather than on the root directory because this does have useful features for the main site, for example allowing incorrect case in the URLs and allowing one character different; see for example https://www.spaconference.org/spa2017/LOCATIONO.html.
  • Loading branch information...
annashipman committed Jul 17, 2017
1 parent 60a0093 commit f15a0820757c13db27578199c6f02a7d79a8b6dc
Showing with 2 additions and 0 deletions.
  1. +2 −0 mediawiki/.htaccess
@@ -10,6 +10,8 @@
Header set Content-Type "text/html"
</FilesMatch>

CheckSpelling Off

RewriteEngine on
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(index\.php)$ $1\%3F%1 [L]

0 comments on commit f15a082

Please sign in to comment.