Permalinks modrewrite conflict
-
I use the anti-hotlink method described at https://www.alistapart.com/articles/hotlinking/
Basically it prevents direct image hotlinking, allows images for people without a referrer and if a site links _to_ an image on your site they will get a page with the image and a credit.
I use the date and name based permalinks and everything seems to be working well except:
When a site links to an image (not hotlinking the image) they get a 404 instead of the image/credit page.I’m really no expert with modrewrite/.htaccess so I’m not sure how to fix this conflict or if it can be fixed at all.
Here is my .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !mydomain.com [NC]
RewriteCond %{HTTP_REFERER} !google. [NC]
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]
RewriteRule (.*) /showpic.php?pic=$1
Options -Indexes
ErrorDocument 403 /403.php
ErrorDocument 404 /403.php
ErrorDocument 500 /403.php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressAny help would be appreciated.
- The topic ‘Permalinks modrewrite conflict’ is closed to new replies.