scotton34/sample/master/.htaccess - Htaccess File

scotton34/sample/master/.htaccess

Options +FollowSymLinks

<IfModule mod_rewrite.c>
  RewriteEngine On

#        RewriteCond %{HTTPS} off
#        # First rewrite to HTTPS:
#        # Don't put www. here. If it is already there it will be included, if not
#        # the subsequent rule will catch it.
#        RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#        # Now, rewrite any request to the wrong domain to use www.
#        RewriteCond %{HTTP_HOST} !^www.
#        RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

         RewriteBase /

  <Files .*>
    Order Deny,Allow
    Deny From All
  </Files>

  # Allow asset folders through
  RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]

  # Protect application and system files from being viewed
  RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d

  RewriteRule .* index.php/$0 [L]
  
  # Prevents access to dot files (.git, .htaccess) - security.
  RewriteCond %{SCRIPT_FILENAME} -d
  RewriteCond %{SCRIPT_FILENAME} -f
  RewriteRule "(^|/)." - [F]
  
</IfModule>
Options -Indexes

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTPS, REQUEST_FILENAME, REQUEST_URI, SCRIPT_FILENAME

Comments

Apache