Jump to content

block external acccess to PHP file


ShaneM

Recommended Posts

Hello,

 

I've attempted to block access to a PHP file within my forums which displays images. It's attachment.php. I've attempted the following, but I get an internal server 500 error when I put it into place. If I deny all then I can't view the images, which defeats the purpose. I can't set it to registered members only either as it will not display other spots where I've used the image.

 

<Files attachment.php>

Order Allow,Deny

  allow all

  Deny from .*torrent\.lt.*

  Deny from .*myspace\.com.*

  Deny from .*ebay\.com.*

  Deny from .*darkwarez\.pl.*

  Deny from .*hi5\.com.*

</Files>

 

Any help would be great.

Thanks.

 

Shane

Link to comment
https://forums.phpfreaks.com/topic/68585-block-external-acccess-to-php-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.