I have the following configuration in .htaccess
ErrorDocument 403 /
It works nicely if I'm restricting a subfolder that exists directly in the root dir, e.g. /var/www/html/sensitivefolder.
But if there's an alias in the .conf files and I want to restrict access to it:
Alias /phpmyadmin /usr/share/phpMyAdmin
The ErrorDocument 403 doesn't redirect to / and I get the standard page:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
Is there a way to make ErrorDocument 403 work with Aliases? Thanks. I'm using Apache 2.4.23.