FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


htaccess - deny from all and more??? Need help ASAP





sonam
I have one folder with scripts (php, js). Some of this scripts I am including others using with forms and POST method. I would like to block (better redirect) anyone to open this folder or/and run script. For example, the scripts are in folder myscripts. If someone types: www.mysite/myscripts/ or www.mysite/myscripts/first_script.php then he/she will be redirected to my home page.

Sonam
Stubru Freak
sonam wrote:
I have one folder with scripts (php, js). Some of this scripts I am including others using with forms and POST method. I would like to block (better redirect) anyone to open this folder or/and run script. For example, the scripts are in folder myscripts. If someone types: www.mysite/myscripts/ or www.mysite/myscripts/first_script.php then he/she will be redirected to my home page.

Sonam


Of course, if you do that people won't be able to load the scripts anymore. I don't see why you would want to do that.
sonam
Quote:
Of course, if you do that people won't be able to load the scripts anymore. I don't see why you would want to do that.


Hmmmm, actually I would like to prevent unautorized using of scripts (run from url bar). Something like hotlink protection for images. My pages show and work with images but if someone type in url bar www.mysite.com/images/some_image.jpg he/she will get forbiden message. You think I canot to do the same with scripts??? Sad

Sonam
Stubru Freak
sonam wrote:
Quote:
Of course, if you do that people won't be able to load the scripts anymore. I don't see why you would want to do that.


Hmmmm, actually I would like to prevent unautorized using of scripts (run from url bar). Something like hotlink protection for images. My pages show and work with images but if someone type in url bar www.mysite.com/images/some_image.jpg he/she will get forbiden message. You think I canot to do the same with scripts??? Sad

Sonam


You can do that, it works exactly the same. But be aware that a lot of people won't be able to view your site, because their browser doesn't send the Referer header that you check. And if someone wants to get the images/scripts, it's easy to fake the Referer header.
sonam
Quote:
You can do that, it works exactly the same. But be aware that a lot of people won't be able to view your site, because their browser doesn't send the Referer header that you check. And if someone wants to get the images/scripts, it's easy to fake the Referer header.


Thanks, I see what do you want to tell me. Wink

Sonam
Related topics
CALLING ALL ACTIONSCRIPTERS, NEED HELP ASAP (IM SERIOUS)
Ajax or JS - need help ASAP
Help
.htaccess... Somebody help me!
pls help me.. what will i do.. will i get pregnant??
.htaccess code help needed
Installing Burning Board Lite
Other People's Business
Jail Time
could this be bad?
Python upgrade
Vancouver Canucks
batman font
Dont Get anything about hosting
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.