How To Prevent Ppl From Bypassing Login And Going Directly Images? |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Zymic Free Web Hosting Zymic Free Web Hosting - General Discussion & Help |
||
![]() |
How To Prevent Ppl From Bypassing Login And Going Directly Images? |
||
Jun 17 2008, 10:24 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 7 Joined: 12-June 08 Member No.: 35,404 |
How do I prevent ppl from bypassing login and going directly images? My index.php has a login, but my pictures are stored in the images dir, how do I prevent somebody (who hasn't logged in) from going to XXXX.vdnv.com/images/pic1.jpg and seeing the image?
Thanks, Greg ps. Obviously I'm new to this... |
|
|
Jun 17 2008, 11:29 PM
Post
#2
|
|
![]() Hosting Abuse Staff ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 2,933 Joined: 14-February 08 From: Fort Myers FL, USA Member No.: 10,089 |
You need to edit your .htaccess file to deny access to that folder. Or you could just create an html file name it index.html and have NOthing on the page except "You shouldn't be here" or something like that.
|
|
|
Jun 18 2008, 12:12 AM
Post
#3
|
|
|
Newbie ![]() Group: Members Posts: 7 Joined: 12-June 08 Member No.: 35,404 |
Ok... I searched online for examples of .htaccess files and found some. Here's the .htaccess file at the root level, but I can still view pic1.jpg... what am I doing wrong?? Is there a time period that must elapse before the change actually occurs on the server?
IndexIgnore */* <Files ~ "\.(jpg)$"> order allow,deny deny from all </Files> <Files .htaccess> order allow,deny deny from all </Files> Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?XXXX.vndv.com/.*$ [NC] RewriteRule \.(gif|jpg)$ - [F] |
|
|
Jun 18 2008, 12:57 AM
Post
#4
|
|
![]() Hosting Abuse Staff ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 2,933 Joined: 14-February 08 From: Fort Myers FL, USA Member No.: 10,089 |
I'm not completely familiar with htaccess, I just know you need to use them. but maybe google this but shouldn't it be "order deny,allow" if that doesn't work, try putting the .htaccess file into the pictures directory.
|
|
|
Jun 18 2008, 01:09 AM
Post
#5
|
|
![]() Super Ninja ![]() ![]() ![]() ![]() Group: Members Posts: 313 Joined: 12-December 07 From: Glendale CA Member No.: 4,714 |
Yeah i belive it is order deny,allow
But anyways you can use PHP to secure the directory |
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 19th June 2013 - 11:46 PM |