• I use the anti-hotlink method described at http://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 WordPress

    Any help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter double0

    (@double0)

    Sorry to bump but 2 weeks, this must be buried. so bump 🙂

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Two things:

    1. Change this:
    RewriteRule (.*) /showpic.php?pic=$1
    to this:
    RewriteRule (.*) /showpic.php?pic=$1 [L]

    2. Make sure that you replaced “mydomain.com” with your actual domain/blog address.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permalinks modrewrite conflict’ is closed to new replies.