The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
i.e. I have a folder full of images. Normally they are being parsed through a script which adds a watermark to them, but since the folder is accessible through a browser, at the moment they could just load the image directly without a watermark. Can I stop them from doing this?
Normally I would just put the images in a folder which can't be accessed by the web browser - i.e. outside the server's tree. However I don't have access to do that on this site.
i.e. I have a folder full of images. Normally they are being parsed through a script which adds a watermark to them, but since the folder is accessible through a browser, at the moment they could just load the image directly without a watermark. Can I stop them from doing this?
Normally I would just put the images in a folder which can't be accessed by the web browser - i.e. outside the server's tree. However I don't have access to do that on this site.
deny from all
allow from "your IP"
It's something like that..hang on, I'll get the place I learnt it from for you...
EDIT: [URL]http://www.kirupa.com/web/htaccess.htm[/URL]
It's got the 404 thing there too, for Shelly's benefit.
BUT FOR GOD'S SAKE DON'T LOOK IF YOU DON'T KNOW WHAT YOU'RE DOING!!!!111 HMMM SAYS SO!!!!1111
Ahem
The other way I was thinking of doing it was by using CHMOD persmissions. Would that work? Set it so it's not publicly readable, only by the web server? I dunno :S
> The other way I was thinking of doing it was by using CHMOD
> persmissions. Would that work? Set it so it's not publicly readable,
> only by the web server? I dunno :S
Wouldn't work, once the webserver can read them, anybody can. Anybody requesting files via HTTP has the webserver's user permissions.
What monkey_man suggested works fine, if you're feeling adventurous and apache has mod rewrite installed, you can extend it further so that if somebody requests the image it gets redirected to your watermarking script too rather than just denying them access.
Shelly is sorted and that was the site I used to find the code its very clever once I sorted my spelling mistake it works just grand. I shant try and block out a whole folder that may be to scary and I have nothing worth copying from my site he he its just a bit of fun.
> EDIT: [URL]http://www.kirupa.com/web/htaccess.htm[/URL]
>
> It's got the 404 thing there too, for Shelly's benefit.
>
>