hotlink protection

Public Enemy No. 1

If you have a WordPress website and using cPanel, be careful of HotLink Protection. It caused the mess earlier this morning, preventing everyone from loading or displaying any images, even on the website itself.

No images is disastrous in a web comic and since I lack the technical skills beyond HTML and CSS, I panicked a little to be honest… The tech support for my webhost was also a little unhelpful. At least I had my backups just in case I couldn’t fix it.

Cause

It seems there’s still an unfixed bug with cPanel’s HotLink Protection. Even if you disable it in the HotLink Protection page, it doesn’t seem to work. Apparently, HotLink Protection adds something to all the .htaccess files in your website directory.

How to fix this

1. Find and download all your .htaccess files in the public_html folder. If you have another website/subdomain, include them too.

2. Open them and look for something like this. In my case, I found it at the bottom.

RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ ^.* [R,NC]

3. Remove them, and then save your .htaccess files.

4. Upload your .htaccess files to wherever you found them.

5. Don’t use HotLink Protection anymore, and don’t open it up in cPanel.

Hope this helped someone else if they encounter this problem!