N
N
newaitix2019-05-16 09:52:52
PHP
newaitix, 2019-05-16 09:52:52

Error pages in htaccess file?

The site on the hosting and ErrorDocument does not work
In the admin panel, you can specify ERROR PAGES, but with certain restrictions.
5cdd0982de02c709020114.jpeg
I'm thinking of doing this in htaccess.

RewriteRule ^errors/401$ errors.php?e=401
RewriteRule ^errors/403$ errors.php?e=403
RewriteRule ^errors/404$ errors.php?e=404
RewriteRule ^errors/500$ errors.php?e=500

and fill in the fields like this
errors/401
errors/403
errors/404
errors/500

But for some reason it doesn't work.
If I type in the address bar https://mysite.com/errors/404 then I get
Array ( )
the following in the errors.php file now
<?
print_r($_GET);
exit;
?>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question