Search code examples
.htaccesshttp-status-code-403cgi-bin

how to redirect to a 403 errors page


U have many 404 URLs in cgi-bin/ folder from 1 year ago;

But I don't redirect this page, because I'm using the following configuration:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ _main.php?url=$1 [L]

How can I get permission for control cgi-bin/* files ?


Solution

  • after very tests ...

    i used this code and worked ^_^(i linked to my mvc "_main.php" and redirected with my mvc setting)

    ErrorDocument 403 /_main.php
    ErrorDocument 404 /_main.php