Author |
Message |
nonamedude
|
Posted: Wed May 25, 2011 2:17 pm Post subject: .htacess |
|
|
Hey guys,
I want to prevent users who dont have a link to a certain file from accessing it.
So far I have tried doing this,
<files delete_comments.php>
order allow,deny
deny from all
</files>
So when I do this, it blocks all users even if they have a link to it. So I am just wondering what I have to put in my htaccess file so that users that do not have a link to delete_comments.php cannot access it. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Amailer

|
Posted: Wed May 25, 2011 2:32 pm Post subject: RE:.htacess |
|
|
Are you trying to stop hotlinking?
http://altlab.com/htaccess_tutorial.html
I assume that's the case, otherwise I'm a bit confused. If someone does not have a link to a file; how can they access it in the first place (they don't know it exists)? |
|
|
|
|
 |
nonamedude
|
Posted: Fri May 27, 2011 10:14 am Post subject: Re: .htacess |
|
|
If the people who do not have a link to the file, they can find links in my source code by pressing "view source code". I just want to prevent people from browsing using URL's. Is there a way to do this? |
|
|
|
|
 |
Tony

|
Posted: Fri May 27, 2011 10:35 am Post subject: RE:.htacess |
|
|
How is the link from the source file different from the link obtained else-how? |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Amailer

|
|
|
|
 |
nonamedude
|
Posted: Fri May 27, 2011 11:05 am Post subject: Re: .htacess |
|
|
"How is the link from the source file different from the link obtained else-how?"
Meaning that on my website, certain users have certain privleges. Those who have the highest priveleges have a link to acess to the delete_comment.php. So they can actually acess the file through the website, and not by changing the URL. |
|
|
|
|
 |
nonamedude
|
Posted: Fri May 27, 2011 11:06 am Post subject: Re: .htacess |
|
|
And I am not using ajax to delete comments, it is just reloading the entire page again. |
|
|
|
|
 |
Tony

|
Posted: Fri May 27, 2011 11:13 am Post subject: RE:.htacess |
|
|
Typically delete_comment.php would check if the current user is logged in and has proper privileges. If so, proceed; else return. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Sponsor Sponsor

|
|
 |
|