WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Why does my hotlinking not work? (3 posts)

  1. billdancourtney
    Member
    Posted 3 years ago #

    I was using hotlink protection from CPanel with little problem until recently. It just stops workings. I have an .htaccess file in public html and content/uplaods folders. This is what they look like:

    RewriteEngine on

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]
    </IfModule>

    # END WPSuperCache

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    # Hotlink Protection START #

    RewriteEngine on

    # Hotlink Protection END #

    RewriteCond %{HTTP_REFERER} !^http://podcast-beatcast.uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://podcast-beatcast.uraniumcafe-the.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.podcast-beatcast.uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.podcast-beatcast.uraniumcafe-the.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com$ [NC]
    RewriteRule .*\.(.*jpeg|jpg|png|gif)$ http://pics.livejournal.com/necrotic_cinema/pic/0000tcpk [R,NC]

    Used to be fine and after some upgrades a while back -maybe around 3.0.1- I began to have problems with it working properly. I gotit all going again a couple mnonths ago but now nothing happens again. This includes using the plugin that installs the code automaitcally to my .htccess.

    Is something crucial missing or added here in my . htaccess?

    I have exhausted myself with this. My WP skills are nominal but I can do somethigns if the directions are clear.

    Thanks

    Bill

  2. billdancourtney
    Member
    Posted 3 years ago #

    I changed rewrite rules, or something, I Super Cache and the .htaccess file changed to this:

    RewriteEngine on
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]
    </IfModule>

    # END WPSuperCache

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/NecroticCinema/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/NecroticCinema$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/MHBe/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/MHBe$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/gkNq/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/gkNq$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/jQDo/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/jQDo$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/rxrM/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/rxrM$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com$ [NC]
    RewriteRule .*\.(.*jpeg|jpg|gif|png|bmp)$ http://pics.livejournal.com/necrotic_cinema/pic/0000d5tg [R,NC]

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    but images stilla re not protected. real drag :(

  3. billdancourtney
    Member
    Posted 3 years ago #

    am now trying to use the pictPocket plugin and still nothign is working:

    RewriteEngine on
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L]

    RewriteCond %{REQUEST_URI} !^.*[^/]$
    RewriteCond %{REQUEST_URI} !^.*//.*$
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L]
    </IfModule>

    # END WPSuperCache

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/NecroticCinema/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/NecroticCinema$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/MHBe/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/MHBe$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/gkNq/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/gkNq$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/jQDo/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/jQDo$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/rxrM/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://feeds.feedburner.com/uraniumcafe-the/rxrM$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.uraniumcafe-the.com$ [NC]
    RewriteRule .*\.(jpeg|jpg|gif|png|bmp)$ http://pics.livejournal.com/necrotic_cinema/pic/0000d5tg [R,NC]

    # BEGIN pictPocket
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_REFERER} !^$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://uraniumcafe-the.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.feedburner.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www.)?google.com/reader(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www.)?google..*(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://images.google..*(/)?.*$ [NC]
    RewriteRule (.*)\.(gif|jpe?g|png)$ wp-content/plugins/pictpocket/pictPocketMoteur.php?pic=$1.$2 [L]

    # END pictPocket

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags