My host doesn’t allow hotlinking so to disable it I’ve used the following code in a .htaccess file.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?csalter\ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]

This appears to work. Well I thought it did.

However as you can see, when you visit this link which is shown below

it blocks you. However copying and pasting it into the browser works.

I didn’t think I was hotlinking as it was hitting a PHP page but it obviously is! Is it the PHP page causing trouble? works fine but extended URL 403’s

Yeah that’s what I’m finding.

However browsing to the extended URL from the index works. So all I can assume is that the PHP isn’t working as I wanted and for some reason somewhere, it thinks it’s a hot link.

I’m sort of tempted to try Coppermine and see how that works but the aim was to keep it minimal - Coppermine will require MySQL which I do have access to but was going to try and avoid as it means I have to back up the database as well as the site content.


Moved to a Coppermine gallery. Not ideal but at least it works.

BTW I like what you have started!
Feel free to take what you might like from any of my galleries.
Just make sure you give the owners their credit.

Thanks for the comments.
I’ll have a look round Coppermine and try and add a All Rights belong to there respective authors paragraph as I’m not wanting to pass it off as my own.
The pictures were only there to test it (they were the contents of My Pictures on my work PC so that’s why they got uploaded)

BTW, all the best!