-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
142 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# ---------------------------------------------------------------------- | ||
# UTF-8 encoding | ||
# ---------------------------------------------------------------------- | ||
|
||
# Use UTF-8 encoding for anything served text/plain or text/html | ||
AddDefaultCharset utf-8 | ||
|
||
# Force UTF-8 for a number of file formats | ||
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml | ||
|
||
# ---------------------------------------------------------------------- | ||
# Some Security | ||
# ---------------------------------------------------------------------- | ||
|
||
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* | ||
SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots | ||
Deny from env=block_bad_bots | ||
|
||
<Limit GET POST> | ||
order deny,allow | ||
deny from all | ||
allow from all | ||
</Limit> | ||
|
||
<Limit PUT DELETE> | ||
order deny,allow | ||
deny from all | ||
</Limit> | ||
|
||
# Prevent Folder's browsing | ||
<IfModule mod_autoindex.c> | ||
Options -Indexes | ||
</IfModule> | ||
|
||
# Block access to "hidden" directories or files | ||
<IfModule mod_rewrite.c> | ||
RewriteCond %{SCRIPT_FILENAME} -d [OR] | ||
RewriteCond %{SCRIPT_FILENAME} -f | ||
RewriteRule "(^|/)\." - [F] | ||
</IfModule> | ||
|
||
# Block access to backup and source files. | ||
<FilesMatch "(\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|swp)|~)$"> | ||
Order allow,deny | ||
Deny from all | ||
Satisfy All | ||
</FilesMatch> | ||
|
||
# Increase cookie security | ||
<IfModule mod_php5.c> | ||
php_value session.cookie_httponly true | ||
</IfModule> | ||
|
||
# Prevent Iframe | ||
Header set X-Frame-Options DENY | ||
|
||
# Disable server signature | ||
ServerSignature Off | ||
|
||
# ---------------------------------------------------------------------- | ||
# Make the index handle all Request's | ||
# ---------------------------------------------------------------------- | ||
|
||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteBase / | ||
RewriteCond %{REQUEST_URI} ^system.* | ||
RewriteRule ^(.*)$ /index.php?/$1 [L] | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^(.*)$ index.php?/$1 [L] | ||
</IfModule> | ||
|
||
# ---------------------------------------------------------------------- | ||
# Error Documents | ||
# ---------------------------------------------------------------------- | ||
ErrorDocument 400 /error/400.html | ||
ErrorDocument 401 /error/401.html | ||
ErrorDocument 404 /error/404.html | ||
ErrorDocument 403 /error/403.html | ||
ErrorDocument 500 /error/500.html | ||
|
||
# ---------------------------------------------------------------------- | ||
# Enable Gzip | ||
# ---------------------------------------------------------------------- | ||
<ifModule mod_gzip.c> | ||
mod_gzip_on Yes | ||
mod_gzip_dechunk Yes | ||
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ | ||
mod_gzip_item_include handler ^cgi-script$ | ||
mod_gzip_item_include mime ^text/.* | ||
mod_gzip_item_include mime ^application/x-javascript.* | ||
mod_gzip_item_exclude mime ^image/.* | ||
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* | ||
</ifModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
User-agent: * | ||
Disallow: |