.htaccess - handle error pages using PHP and htaccess -
i want put codes below in htaccess file:
errordocument 403 /error/403 errordocument 404 /error/404 errordocument 500 /error/500 ...
and have php file handles error pages me using ( file.php?a=404 ).
now, need htaccess code rewrite "/error/404" "file.php?a=404" me. should ?!
there's several other error documents might wish customise. 400 - bad request 401 - authorization required 403 - forbidden directory 404 - page not found 500 - internal server error
for each 1 want use, add line .htaccess file , create corresponding page.
errordocument 400 /errors/badrequest.html errordocument 401 /errors/authreqd.html errordocument 403 /errors/forbid.html errordocument 404 /errors/notfound.html errordocument 500 /errors/serverr.html
Comments
Post a Comment