Custom Error 403 Page PHP
问题 I created a .htaccess inside a directory in which I don't want the files to be directly accessed. It works and fires the default 403 page (Access forbidden!) of the Apache server. How can I create a custom 403 page? Thanks! 回答1: In your .htaccess file you can specify what document you want as your default 403 error document ErrorDocument 403 /dir/file.html Here the directory is relative to the document root. 回答2: You can do something like the following: #Rewrite URL's RewriteEngine On