WordPress.org

Ready to get started?Download WordPress

Forums

hotlink protection not working. htaccess filled with wordpress info. (3 posts)

  1. wasabichimera
    Member
    Posted 8 years ago #

    Greetings,
    I tried the support forums for my host however no one could figure it out. I have enabled hotlink protection but still cannot get it to work. Someone suggested it might have to do with all the wordpress info in the htacess file. I have wordpress setup on a subdomain.

    Is anyone familiar with this problem?

    Here is the contents of my subdomain htaccess file.

    # BEGIN WordPress

    RewriteEngine On<br />
    RewriteBase /<br />
    RewriteCond %{REQUEST_FILENAME} -f [OR]<br />
    RewriteCond %{REQUEST_FILENAME} -d<br />
    RewriteRule ^.*$ - [S=35]<br />
    RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]<br />
    RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]<br />
    RewriteRule ^page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]<br />
    RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]<br />
    RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]<br />
    RewriteRule ^comments/page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]<br />
    RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /index.php?s=$1&paged=$2 [QSA,L]<br />
    RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]<br />
    RewriteRule ^category/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]<br />
    RewriteRule ^category/(.+)/?$ /index.php?category_name=$1 [QSA,L]<br />
    RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /index.php?author_name=$1&paged=$2 [QSA,L]<br />
    RewriteRule ^author/([^/]+)/?$ /index.php?author_name=$1 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /index.php?year=$1&paged=$2 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/?$ /index.php?year=$1 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2&day=$3 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&paged=$5 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA,L]<br />
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&tb=1 [QSA,L]

    # END WordPress<br />
    Options All -Indexes

    RedirectMatch temp ^/a$ http://officera.com

    RewriteEngine on<br />
    RewriteCond %{HTTP_REFERER} !^$<br />
    RewriteCond %{HTTP_REFERER} !^http://zinthrop.com/.*$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://zinthrop.com$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://www.zinthrop.com/.*$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://www.zinthrop.com$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://zinthrop.officera.com/.*$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://zinthrop.officera.com$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://www.zinthrop.officera.com/.*$ [NC]<br />
    RewriteCond %{HTTP_REFERER} !^http://www.zinthrop.officera.com$ [NC]<br />
    RewriteRule .*.(jpg|jpeg|gif|png|bmp)$ - [R,NC]

  2. skippy
    Member
    Posted 8 years ago #

    Try placing the non-WordPress rules _above_ the WordPress rules in the .htaccess file. Does that produce different results?

  3. wasabichimera
    Member
    Posted 8 years ago #

    Yeah, it did not seem to matter.

Topic Closed

This topic has been closed to new replies.

About this Topic