home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

HELP please..

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2416
Discussions: 200,994, Posts: 2,379,932, Members: 246,362
Old January 8th, 2004, 04:34 PM   Digg it!   #1 (permalink)
Registered User
 
Join Date: Jan 2004
Location: UK Manchester
Posts: 24
Unhappy
HELP please..

HI all

Im going to give up!!!!!

Any one help with .htaccess file

I have a folder called /private
this folders index page is accessed via a login page
the login page is main folder that Private is a sub folder of.

how to i stop people just typing ***** /login/private/index.htm and passing my login page.

I only want any access to /private or its subfolders to be done if the person has come via my login page.

Any idears folks???

someone must know...
please help..........

Last edited by Therave : January 8th, 2004 at 10:37 PM.
Therave is offline   Reply With Quote
Old January 14th, 2004, 10:26 PM     #2 (permalink)
Ultimate Member
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,879
Send a message via ICQ to crouse
using the .htaccess page itself you can limit via REFERERS

IE: (from http://unix.support.superb.net/data/web-pw.php)
---------------------------------
Create a file .htaccess in that directory that looks similar to:

AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/restricted/
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/restricted/
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/
RewriteCond %{HTTP_REFERER} !^http://authorizedlinksite.com/
RewriteCond %{HTTP_REFERER} !^http://www.authorizedlinksite.com/
RewriteRule /* http://www.yoursite.com/restricted/index.html [R,L]

where yourdomain.com is your domain and authorizedlinksite.com is a site that can link to your restricted directory. There can be no, or multiple, such authorized link sites. Note that the trailing slashes (/) are important and must be included.

Now try to access the authorized directory from a link on your site, from a link on the authorized site(s), if any, and, if possible, from a link from an unauthorized site (to ensure that it is restricting access properly). The latter test can be conducted using a link from a sub-directory of your site (eg. http://www.yourdomain.com/somedirectory/) that is not listed as a valid referrer as well.
---------------------------------

HTH's
__________________
USA Linux Users Group
OpenSUSE.us

Last edited by crouse : January 14th, 2004 at 10:28 PM.
crouse is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3088)
Foxconn Blackops x48 MoBo (5)
Charges against non-tippers dropped.. (22)
Health Care Rationing (16)
Delete an OS (17)
Nvidia GTX 260 problem (12)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
windows vista security holes (19)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
[F@H SPAM 11/16/09] ! 1/2 months to.. (41)
windows 7 problem (7)
Recent Discussions
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Nvidia GTX 260 problem (12)
Foxconn Blackops x48 MoBo (5)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (41)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)


All times are GMT -4. The time now is 11:00 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28