Possible htaccess problem?
-
I was having problems with images not loading on the domain.com version of my site (www.domain.com loads fine). So I notified my support and they returned with this:
In your app’s .htaccess file I see this code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(.*)?\.xxxxxx\.com [NC]
RewriteRule \.(gif|jpe?g?|png)$ – [F,NC,L]It looks like this was created by the All in One WP Security plugin, and it is blocking image requests.
I think the problem is with the HTTP Referrer line. This regex looks like it is not correct: !^http(s)?://(.*)?\.xxxxx\.com
It looks like it is matching “.xxxxx.com”. The period in front may be messing up the match.
I’d recommend either modifying the code to match correctly, or removing it from the .htaccess file altogether.
- The topic ‘Possible htaccess problem?’ is closed to new replies.