Commit a35ddc6f authored by Ben Cooksley's avatar Ben Cooksley

As Apache cannot serve 404 codes itself other than through ErrorDocument, and...

As Apache cannot serve 404 codes itself other than through ErrorDocument, and we have no way of populating the .htaccess with the currently in use language (as ErrorDocument requires a non-relative path), let's use PHP to serve the 404 page
parent 783f5cd7
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule "^(.*)" 404.html [NC,L]
RewriteRule "^(.*)" 404.php [NC,L]
# Old mediawiki pages redirects.
......
<?php
http_response_code(404);
include('404.html'); // provide your own HTML for the error page
?>
......@@ -89,7 +89,7 @@ language = 'en'
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_extra_path = ['.htaccess'] # copy over .htaccess file to each langaguge
html_extra_path = ['.htaccess', '404.php'] # copy over .htaccess file to each langaguge
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment