Forum Moderators: phranque
everytime i reload a page on my site (since this has been installed) the releoad makes all my images dead.. In other words reloading messes up my entire page.. I'm guessing its somethign to with cache? but i was wodnering if theres somethin i can add to the .htaccess file that would allow me to reload the page and have it still show my images..
only do i think i will want to use this method.
any ideas? thanks.
1) Open a text editor
2) Cut and paste:
RewriteCond %{HTTP_REFERER}!^http://yoursite.com/ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.yoursite.com/ [NC]
RewriteRule [^/]+.(gif¦jpg)$ - [F]
3) change yoursite.com as appropriate
4) save as .htaccess
5) upload to your images folder
6) check your site and make sure it still works :)
In many cases a referrer is not passed with the request, and this could be your reload problem. Try:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com/
RewriteRule \.(gif¦jpg)$ - [F]
As noted, the broken vertical pipe "¦" must be changed to a solid vertical pipe before use. If this does not work, please consider providing a snippet from your site's error log, to clarify the problem.
HTH,
Jim