Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Why not work the custom error pages?

+1 vote
asked 2 days ago in Q2A Core by Dávid Kocsis


I have a problem, i want to add custom error pages in question2answer, but doesn't work. 

what should I change the .htaccess file?

In my .htacces file: 

Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

ErrorDocument 400 /error-pages/400.html
ErrorDocument 401 /error-pages/401.html
ErrorDocument 403 /error-pages/403.html
ErrorDocument 404 /error-pages/404.html
ErrorDocument 405 /error-pages/405.html
ErrorDocument 406 /error-pages/406.html
ErrorDocument 408 /error-pages/408.html
ErrorDocument 413 /error-pages/413.html
ErrorDocument 414 /error-pages/414.html
ErrorDocument 417 /error-pages/417.html
ErrorDocument 500 /error-pages/500.html
ErrorDocument 502 /error-pages/502.html
ErrorDocument 503 /error-pages/503.html
ErrorDocument 504 /error-pages/504.html

1 Answer

+2 votes