GetDotted Domains

Viewing Thread:
".htaccess"

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.

Wed 06/04/05 at 13:50
Regular
"NULL"
Posts: 1,384
Whilst on the subject on .htaccess files, does anyone know if I can use one to restrict a file being loaded directly into the browser window.

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.
Wed 06/04/05 at 13:50
Regular
"NULL"
Posts: 1,384
Whilst on the subject on .htaccess files, does anyone know if I can use one to restrict a file being loaded directly into the browser window.

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.
Wed 06/04/05 at 13:54
Regular
"Pouch Ape"
Posts: 14,499
order deny,allow
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
Wed 06/04/05 at 14:08
Regular
"NULL"
Posts: 1,384
Good thinking! Hadn't thought of that! Ooops. Lol.

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
Wed 06/04/05 at 14:13
Regular
"Pouch Ape"
Posts: 14,499
Not sure, mate. Try it and see.
Wed 06/04/05 at 14:21
Regular
"NULL"
Posts: 1,384
Can't CHMOD on my home machine cos it's Windows, but I'll try it when I go live. If not, I'll stick to .htaccess.
Wed 06/04/05 at 14:59
Regular
"Devil in disguise"
Posts: 3,151
Nimco wrote:
> 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.
Wed 06/04/05 at 15:20
Regular
"NULL"
Posts: 1,384
Cool, cheers. I think I'll just leave the default error though, not worry about mod_rewrite.
Wed 06/04/05 at 16:35
Regular
Posts: 460
>
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.
>
>

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Excellent support service!
I have always found the support staff to provide an excellent service on every occasion I've called.
Ben
I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.