Skip to content

Instantly share code, notes, and snippets.

@man-oi
Created August 23, 2016 07:20
Show Gist options
  • Save man-oi/a7bf75f48a00942588116bbd0b5db80e to your computer and use it in GitHub Desktop.
Save man-oi/a7bf75f48a00942588116bbd0b5db80e to your computer and use it in GitHub Desktop.
ErrorDocument 403 /403.php
ErrorDocument 401 /401.php
ErrorDocument 410 /410.php
RewriteCond %{QUERY_STRING} ^status=401$
RewriteRule ^ - [L,R=401]
RewriteCond %{QUERY_STRING} ^status=403$
RewriteRule ^ - [L,R=403]
RewriteCond %{QUERY_STRING} ^status=404$
RewriteRule ^ - [L,R=404]
RewriteCond %{QUERY_STRING} ^status=410$
RewriteRule ^ - [L,R=410]
RewriteCond %{QUERY_STRING} ^status=500$
RewriteRule ^ - [L,R=500]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment