mod_rewrite to control access to a subdir....

Fix it!!

Postby GandalfM » Mon Aug 27, 2001 4:10 am

hello,

i am quite new to mod_rewrite...

and i try to do one thing now for the last 3 days...

i have a subdirectory on my webserver, which i just want to give other sites access to...

e.g:
my server:
http://212.42.242.69/members/
(directory which should be secure)

customer1:
http://www.abc123.de/members/information/weather.php
(has an "a href..." which links to my http://212.42.242.69/members/)

customer2:
http://123.123.123.123/information/summer.html
(has an "a href..." which links to my http://212.42.242.69/members/)

people who comes from the customer sites, ref links, should get access to the subdir...

all other people on the i-net, who try to get access to http://212.42.242.69/members/ should be blocked...

i tried several things, also i tried to the examples which i found - to protect e.g. gif files etc... -> i never got it to work...

if someone has any hints, or can guide, or help me...

hope to geht some working tips.

thanks in advance!!!

greetings,
thomas
GandalfM
 
Posts: 2
Joined: Sun Aug 26, 2001 4:00 pm
Location: Germany

Postby Brett » Wed Aug 29, 2001 10:02 am

Hi Thomas,

If none of the examples worked, the first question is, are you sure that your server supports mod_rewrite?
Brett
 
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm
Location: yohost.com

Postby GandalfM » Wed Aug 29, 2001 11:09 am

Hi Brett,

I use, e.g. "RewriteRule" with "[P]" - to use the Proxy... and it works perfect.

So, I guess "mod_rewrite" it self works perfect on my server.
GandalfM
 
Posts: 2
Joined: Sun Aug 26, 2001 4:00 pm
Location: Germany

Postby Brett » Wed Aug 29, 2001 7:59 pm

If I understand you correctly, you're saying you want your page to display ONLY if the visitor clicked on a link from an "approved" site. Correct?

The first problem is that some users have software which hides the $HTTP_REFERER, so you have to decide how to handle cases where there is no $HTTP_REFERER. The "gif protection" examples allow access in this case.

If the above doesn't explain what is happening in your situation, it might help if you give an example of the code you're using, and further explain what you mean when you say it doesn't work. (i.e. it's letting everyone in, or it's not allowing access to qualified visitors, or whatever.)
Brett
 
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm
Location: yohost.com


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 12 guests

cron