| Author |
Message |
Scott tutorialtoday.com

Joined: 24 Mar 2005 Posts: 2632 Location: Mississauga, Ontario
|
Posted: Mon Apr 28, 2008 7:39 pm Post subject: Blocking Everyone .htaccess |
|
|
How can I block everyone from viewing my site (and automatically show a certain page) except allow me to view it normally, by specifying my IP. I have done this before but I can't remember how I did it. _________________ Tutorial Management Script - Version 1.4 Released
TutorialToday - Up and running, submit your tutorials!
Linux Tutorials - Coming Soon |
|
| Back to top |
|
| |
ClickFanatic Est. 2005

Joined: 18 Jan 2005 Posts: 3980 Location: A particular geographic area
|
Posted: Tue Apr 29, 2008 6:32 pm Post subject: |
|
|
Using Allow, Deny and ErrorDocument directives should work. Something like this perhaps:
| Code: | ErrorDocument 403 /403.html
Deny from all
Allow from youriphere |
_________________ Captain Jell-O Buster from the Future
[img]http://feeds.feedburner.com/sparepencil.1.gif[/img] |
|
| Back to top |
|
| |
ruyss Proud 2 B lifeless

Joined: 08 Jul 2004 Posts: 2618 Location: Belgium
|
Posted: Thu May 01, 2008 11:17 am Post subject: |
|
|
Does the solution by ClickFanatic work? And if it does, would it be possible to allow multiple ip's, so you can create a private site just for you and a couple of friends? I'm a total noob when it comes to .htacces so forgive me for my stupid questions . _________________ .// Proud to be Lifeless for more then 4 years \\. |
|
| Back to top |
|
| |
LP-SolidRaven Dictator of the Dump

Joined: 06 Jun 2004 Posts: 7182 Location: The cheese is made out of moon
|
Posted: Thu May 01, 2008 12:14 pm Post subject: |
|
|
| ruyss wrote: | Does the solution by ClickFanatic work? And if it does, would it be possible to allow multiple ip's, so you can create a private site just for you and a couple of friends? I'm a total noob when it comes to .htacces so forgive me for my stupid questions . |
If you want it to work with logins you could just use cpanel's web access manager I guess. _________________
| Quote: |
<bart416> I just realized something
<bart416> we celebrate the fact that this piece of rock made one rotation around a glowing ball of plasma that is kept together due to its own gravity well
<njsg> HAPPY NEW YEAR
<Easter> ^^
|
|
|
| Back to top |
|
| |
ClickFanatic Est. 2005

Joined: 18 Jan 2005 Posts: 3980 Location: A particular geographic area
|
Posted: Thu May 01, 2008 5:51 pm Post subject: |
|
|
| ruyss wrote: | Does the solution by ClickFanatic work? And if it does, would it be possible to allow multiple ip's, so you can create a private site just for you and a couple of friends? I'm a total noob when it comes to .htacces so forgive me for my stupid questions . |
You can allow multiple IP addresses, but if you want to build a private site I would recommend setting up HTTP authentication. You can do this in cPanel (Web Protect, under Site Management). _________________ Captain Jell-O Buster from the Future
[img]http://feeds.feedburner.com/sparepencil.1.gif[/img] |
|
| Back to top |
|
| |
ruyss Proud 2 B lifeless

Joined: 08 Jul 2004 Posts: 2618 Location: Belgium
|
Posted: Fri May 02, 2008 5:09 am Post subject: |
|
|
Thanks guys, I'll try this out. If I run into problems I'll just ask again . _________________ .// Proud to be Lifeless for more then 4 years \\. |
|
| Back to top |
|
| |
krt ...

Joined: 11 Jan 2005 Posts: 4709 Location: Down Under
|
Posted: Fri May 02, 2008 7:02 pm Post subject: |
|
|
ruyss, to use multiple IPs, just add more "allow" lines, e.g.
| Code: | Deny from all
Allow from ip1
Allow from ip2
Allow from ip3
[...] |
|
|
| Back to top |
|
| |
ClickFanatic Est. 2005

Joined: 18 Jan 2005 Posts: 3980 Location: A particular geographic area
|
|
| Back to top |
|
| |
|
|
|