Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
626 views
in Q2A Core by

Hi!

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]
</IfModule>

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

2 Answers

+2 votes
0 votes
by

your .htaccess looks fine to me....I hope /error-pages/400.html is accessible ...check path again.

...