Tag Archives: Http Referer

Help! Nowhere hidden to put private config file!

On the new website, all I’ve is a actual directory on my personal FTP. I do not have any directories underneath it helping put config files, we don’t want anybody to determine. The people along at the host said in order to password protect the directory the config file is currently in (a subdir in the root) with htaccess, but merely do this then the PHP include()s won’t be able to access it. Possibly there is any other way to make this file private on the outside world With thanks! You could take a step like this: PHP: if  (  $_SERVER’PHP_SELF’  ==  ‘/protectedFolder/protectedFile. php’  )        die(  ‘Private  record,   buddy.   Step  back again. ‘  ); I believe should work. Naturally, you change /protected… on the appropriate folder/file, relative on the *server root*. Ah I see, so should the actual file inside the browser is the private one, it’s going to display the meaning, but if it is a different page as well as private file is just being included, it won’t Because it isn’t really the current page I think I getcha. With thanks, buddy WE wouldn’t even show a message. Just forward them onto for … Continue reading

Posted in Web Design | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Stopping Hotlinking Using .htaccess

I will be trying to include this code around my. htaccess file with regard to stopping hotlinking but i will be having the impression angryman. jpeg, pointed out below, replacing a number my images. Can you please indicate is there a problem Regards for your help. RewriteEngine on RewriteCond %HTTP_REFERER! $ RewriteCond %HTTP_REFERER! http: //(www\. )mydomain. com/. *$ NC RewriteRule \. (gifjpg)$ http: //www. mydomain. com/angryman. jpeg UR, L I am just not an. htaccess professional… But I did find this: http: //altlab. com/htaccess_tutorial. html maybe that might give you some ideas. . Cherished Sir, Everyone helped me solve my problem. Thanks a great deal for your help. That was an amazing site for equally coding and testing of hotlinking.

Posted in Web Design | Tagged , , , , , , , , , , | Leave a comment