• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Bandwidth Theft Question?

#1
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?
 
#5
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>
 
#6
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.
 
#7
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>
 
#8
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)
 
#9
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