Bandwidth Theft Question?

  • Thread starter Thread starter Deleted member 745
  • Start date Start date
D

Deleted member 745

Guest
Hi,

How come if I put a .htaccess file in the root to protect from bandwidth theft and install XF in /community/ the script in the root will not protect the /community/ folder unless I had that .htaccess file in that folder as well?

EG - I have to scripts exactly the same here.

/.htaccess
/community/.htaccess

Any ideas?
 
It should work.
I have hotlinking enabled on my domain and only the root .htaccess is required.
 
Should I show you what I have in my file via a PC or post them here so you can have a look?
 
This is what I have in mine.

Code:
RewriteRule .*\.(jpeg|gif|bmp|png|jpg)$ images/hotlink.jpg [L]
 
I got this....

/community/.htaccess
PHP:
<IfModule mod_rewrite.c>
  RewriteEngine On

   RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^(data|js|styles|install) - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
IF YOU HAVE AN .HTACCESS FILE FOR XENFORO IN YOUR COMMUNITY DIRECTORY THEN THE ROOT .HTACCESS WON'T OVERRIDE OR AUTOMATICALLY APPEND ITSELF TO IT. (OR ANY OTHER SUBFOLDER FROM ROOT.
 
but I have to have one in /community/ as theres one included with this content. So I'm stuck with both .htaccess files with the same content in them both (partly)

PHP:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
The .htaccess file thats included with XF would it be better to put all files in my /community/ folder and the XF .htaccess in my root, like this?

/.htaccess (including the lines from the XF .htaccess)
PHP:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

/community/ (all other files here but not the .htaccess file)
 
but I have to have one in /community/ as theres one included with this content. So I'm stuck with both .htaccess files with the same content in them both (partly)

PHP:
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

THE ONLY PART THAT WOULD BE DOUBLE IS THE PART FOR HOTLINK PROTECTION.

IN YOUR ROOT .HTACCESS
Code:
RewriteRule .*\.(jpeg|gif|bmp|png|jpg)$ images/hotlink.jpg [L]

THEN IN YOUR /COMMUNITY/.HTACCESS
Code:
XENFORO DEFAULT HTACCESS
RewriteRule .*\.(jpeg|gif|bmp|png|jpg)$ images/hotlink.jpg [L]

ALSO ITS INTERNATIONAL CAPS LOCK DAY. HENCE MY CONSTANT USAGE OF CAPSLOCK
 
Top Bottom