Anyway to have HTACCESS return 200 status code after a 403 block?
I am using htaccess to block an ip address via the "deny from #.#.#.#"...i also use the "ErrorDocument 403 /page.htm" to show the user a different page. However, when i do this the user gets back a 403 status code...is there a way to return back a 200 status code and still show the page....ideally i dont want the user to get back a 403 status code when the page content is returned.
Instead of denying #.#.#.#, you could probably use a rewrite rule based on the address. Something like this, maybe:
Try it out on a test server first... I'm not much of an expert at .htaccess files, etc.
RewriteCond %(REMOTE_ADDR) ^#.#.#.#
RewriteRule ^/$ /redirectedpage.html
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)