Forums / Cotonti / Extensions / [RELEASE] Cotonti Awesome mod_rewrite URL System

fade2k
#13927 2009-07-09 13:28
I just wanted to note that when using this on a primary domain (account) with hostgator will require you to also have .htaccess files in all add-on domain folders otherwise it wouldn't allow me to see the sites (gave error).

Here is one that got my other sites to work on hostgator (in the event someone needs it):

RewriteEngine on
RewriteBase /

# Protect .htaccess and .htpasswd files
<FilesMatch "^\.ht">
  Order allow,deny
  Deny from all
</FilesMatch>

# Protect config.* files
<FilesMatch "^config(\..*)?$">
  Order deny,allow
  Deny from all
</FilesMatch>

# Protect files depending on extension
<FilesMatch "^(.*)\.(inc|inc\.php|tpl|tpl\.php|sql|txt|dat|csv|exe|dll)$">
  Order deny,allow
  Deny from all
</FilesMatch>

# Disable directory browsing
Options -Indexes
- Be Kind, Please Rewind -