Created
October 1, 2019 19:26
-
-
Save jgmac1106/fe8b059cae4261539c31869a18b7916b to your computer and use it in GitHub Desktop.
My Known .htaccess file
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
#RewriteBase / | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{ENV:BASE} ^$ | |
RewriteCond $1::%{REQUEST_URI} ^(.*)::(.*?)\1$ | |
RewriteRule ^(.*)$ - [ENV=BASE:%2] | |
RewriteRule ^js/canary\.js$ %{ENV:BASE}/js/default.js [L] | |
# The query string cache trick doesn't really work, so use rewrite rules instead | |
RewriteRule ^js/[0-9]+/(.*)$ %{ENV:BASE}/js/$1 [L] | |
RewriteRule ^css/[0-9]+/(.*)$ %{ENV:BASE}/css/$1 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ %{ENV:BASE}/index.php?/$1 [L,QSA] | |
RewriteRule ^Uploads.* - [F] | |
RewriteRule ^.well-known/(host-meta|webfinger).* https://fed.brid.gy/$0 [redirect=302,last] | |
</IfModule> | |
<Files ~ "\.dist$"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "composer\.lock"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "known\.php"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "\.known"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "\.ini$"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "\.yml$"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "\.xml$"> | |
Order allow,deny | |
Deny from all | |
</Files> | |
<Files ~ "sitemap\.xml"> | |
Order allow,deny | |
Allow from all | |
</Files> | |
<Files ~ "feed\.xml"> | |
Order allow,deny | |
Allow from all | |
</Files> | |
<Files ~ "rss\.xml"> | |
Order allow,deny | |
Allow from all | |
</Files> | |
#<Files ~ "\.php$"> | |
# Order allow,deny | |
# Deny from all | |
#</Files> | |
<Files ~ "warmup\/*\.*"> | |
Order allow,deny | |
Allow from all | |
</Files> | |
<Files ~ "index\.php"> | |
Order allow,deny | |
Allow from all | |
</Files> | |
AddType video/ogg .ogv | |
AddType video/mp4 .mp4 | |
AddType video/webm .webm | |
# BEGIN cPanel-generated php ini directives, do not edit | |
# Manual editing of this file may result in unexpected behavior. | |
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) | |
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) | |
<IfModule php7_module> | |
php_flag display_errors Off | |
php_value max_execution_time 60 | |
php_value max_input_time 60 | |
php_value max_input_vars 3000 | |
php_value memory_limit -1 | |
php_value post_max_size 150M | |
php_value session.gc_maxlifetime 1440 | |
php_value session.save_path "/var/cpanel/php/sessions/ea-php73" | |
php_value upload_max_filesize 150M | |
php_flag zlib.output_compression Off | |
</IfModule> | |
<IfModule lsapi_module> | |
php_flag display_errors Off | |
php_value max_execution_time 60 | |
php_value max_input_time 60 | |
php_value max_input_vars 3000 | |
php_value memory_limit -1 | |
php_value post_max_size 150M | |
php_value session.gc_maxlifetime 1440 | |
php_value session.save_path "/var/cpanel/php/sessions/ea-php73" | |
php_value upload_max_filesize 150M | |
php_flag zlib.output_compression Off | |
</IfModule> | |
# END cPanel-generated php ini directives, do not edit | |
# php -- BEGIN cPanel-generated handler, do not edit | |
# Set the “ea-php73” package as the default “PHP” programming language. | |
<IfModule mime_module> | |
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml | |
</IfModule> | |
# php -- END cPanel-generated handler, do not edit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment