»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 01-08-2004, 01:34 PM   #1 (permalink)
Registered User
 
Join Date: Jan 2004
Location: UK Manchester
Posts: 24
Therave is on a distinguished road
Systems 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; 01-08-2004 at 07:37 PM.
Therave is offline   Reply With Quote
Old 01-14-2004, 07:26 PM   #2 (permalink)
Registered User
 
crouse's Avatar
 
Join Date: Jun 2002
Location: Iowa
Posts: 2,527
crouse is on a distinguished road
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
__________________
The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners. --- Author Unknown.

Last edited by crouse; 01-14-2004 at 07:28 PM.
crouse is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 12:51 PM.