help with Wordpress .htaccess

Discussion in 'Apache' started by PPCInformer, Jun 27, 2008.

  1. #1
    I have a selfhosted wordpress blog , The htaccess I currently has is
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    AddType Applicaions/CAB .cab
    Code (markup):
    No I want to prevent hotlinking to my files and display a page on my site. I looked around on google and found this

    
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://([a-z0-9]+\.)?1800pocketpc\.com     [NC]
    RewriteRule ^(.*)\.(gif|jpg|png)$ http://www.1800pocketpc.com/sorry-hotlinking-has-been-disabled?$1.$2   [NC,L] 
    Code (markup):
    I was wondering if its correct , and so does the final code looks like

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://([a-z0-9]+\.)?1800pocketpc\.com     [NC]
    RewriteRule ^(.*)\.(gif|jpg|png)$ http://www.1800pocketpc.com/sorry-hotlinking-has-been-disabled?$1.$2   [NC,L] 
    
    
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule . /index.php [L]
    
    </IfModule>
    
    # END WordPress
    
    AddType Applicaions/CAB .cab
    RewriteEngine on
    Code (markup):

     
    PPCInformer, Jun 27, 2008 IP
  2. IGiveMoney

    IGiveMoney Peon

    Messages:
    116
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why not just enable the disabling of hot linking on your server?
     
    IGiveMoney, Jun 29, 2008 IP