phpbb styles protect

Protect template files

Submitted by CyberAlien, Feb 2007.
Because of phpBB template structure everyone can easily download template files from your forum’s templates directory. It can be used to steal commercial or custom templates.



There is a simple way of preventing this: using apache’s mod_rewrite to prevent access to template files.



For phpBB 2.0 to protect your templates you need to create file .htaccess in directory “templates” and put this code in it:
Code:

  1.  
  2. Order allow,deny
     
  3. Deny from all
     
  4. Satisfy All
     
  5.  
For phpBB 3.0 to protect your templates you need to create file .htaccess in directory “styles” and put this code in it:

Code:

  1.  
  2. Order allow,deny
     
  3. Deny from all
     
  4. Satisfy All
     
  5.  
That’s all. Now users will not be able to access template files they aren’t supposed to access.

Share this tutorial

If you want to show this tutorial to someone else please use following code to link to this tutorial:

HTML Link:
Protect template files” class=”text” onclick=”this.focus(); this.select();”/>
Forum BBCode:

Content of this tutorial may not be published anywhere else without author’s permission. Please link to this page instead.