Click to See Complete Forum and Search --> : Anyway to have HTACCESS return 200 status code after a 403 block?


corezz
04-22-2010, 08:38 PM
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.

Thanks

Chipzzz
04-22-2010, 11:05 PM
Instead of denying #.#.#.#, you could probably use a rewrite rule based on the address. Something like this, maybe:


RewriteCond %(REMOTE_ADDR) ^#.#.#.#
RewriteRule ^/$ /redirectedpage.html


Try it out on a test server first... I'm not much of an expert at .htaccess files, etc. ;)
Good luck