MyBB Community Forums

Full Version: .htaccess
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Guys, I want to use this code to only allow me to view a site for now:

order allow,deny
deny from all
allow from [Instert IPs Seperated by commas here]

I'm wondering if theres a way to show a message to everyone eles, the 'denied' but I will still be able to view the site normally.
If Apache denies an IP, IIRC it will automatically send them an error page (I think 403) so if you want to customize it further then you'll want to set up that error's page.

Just be sure you know when your IP changes or you'll get the 403 as well.
Yeah I've only got 2 IP's so I think I'm covered. And it's a short term thing too soo.
Add this to the bottom:

ErrorDocument 403 http://someotherdomain.com/forbidden.html

It needs to be on another domain, otherwise the error page will also 403 Smile
This is what I use:

<Files 403.shtml>
order allow,deny
allow from all
</Files>
(2010-06-22, 09:06 AM)KuJoe Wrote: [ -> ]This is what I use:

<Files 403.shtml>
order allow,deny
allow from all
</Files>

Hmm, never knew you could do that. Thanks.