Author |
Message |
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Wed Jun 02, 2004 1:03 pm (20 years, 5 months ago) |
|
I have a speed test script on Freedom2Support that is to test the speed of a freedom2surf adsl connection with a 2MB test file, however I want to make it so only people who are on an IP in the:
194.106.*.*
and
195.137.*.*
Ranges can access speedtest.php, how can I do this? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 02, 2004 3:44 pm (20 years, 5 months ago) |
|
In an .htaccess file:
Code: | Deny from all
Allow from 194.106.*.*
Allow from 195.137.*.*
|
I think that should do it. |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Wed Jun 02, 2004 6:01 pm (20 years, 5 months ago) |
|
What do I use though if I want to just protect one page, rather than the whole directory?
As I want to make speedtest.php accessable to F2S IP's only but the rest of the directory avaliable to anyone. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 02, 2004 8:19 pm (20 years, 5 months ago) |
|
Try this:
Code: | <Files speedtest.php>
Deny from all
Allow from 194.106.*.*
Allow from 195.137.*.*
</Files>
|
|
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Wed Jun 02, 2004 11:49 pm (20 years, 5 months ago) |
|
Tried that, afraid it seems to ban everyone then, I'm running Apache 2.0.49, if that bears any difference? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Jun 03, 2004 7:14 am (20 years, 5 months ago) |
|
Does the code work properly on the whole directory (ie without the <Files> tag)? |
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Thu Jun 03, 2004 8:15 am (20 years, 5 months ago) |
|
Nope, gives me a 403 on everything, and as you can see, I'm on a 195.137.*.* IP. |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Jun 03, 2004 8:19 am (20 years, 5 months ago) |
|
Sorry, I think it's just the syntax which is wrong:
Code: | <Files speedtest.php>
Deny from all
Allow from 194.106
Allow from 195.137
</Files> |
|
________________________________
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Thu Jun 03, 2004 8:43 am (20 years, 5 months ago) |
|
Cheers, that worked perfectly |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Jun 03, 2004 10:07 am (20 years, 5 months ago) |
|
Glad it worked |
________________________________
|
|
|
|
|
Page generation time: 0.13184 seconds :: 17 queries executed :: All Times are GMT
Powered by
phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme