Last active
August 15, 2019 15:15
-
-
Save zatkoma/6425eb2f93c3c6affd46828de044e95b to your computer and use it in GitHub Desktop.
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
# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html) | |
# disable directory listing | |
<IfModule mod_autoindex.c> | |
Options -Indexes | |
</IfModule> | |
# enable cool URL | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# use HTTPS | |
# ensure www. | |
#RewriteCond %{HTTP_HOST} !^www\. [NC] | |
#RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
# ensure https | |
#RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
#RewriteCond %{HTTPS} off | |
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
### END WWW & HTTPS | |
# prevents files starting with dot to be viewed by browser | |
RewriteRule /\.|^\.(?!well-known/) - [F] | |
RewriteCond %{REQUEST_URI} ^/public/ | |
RewriteRule ^public/(.*) /$1 [L,NC,R=301] | |
Redirect 301 /o-nas/reference /reference | |
# front controller | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule !\.(pdf|js|ico|gif|css|rar|png|zip|tar\.gz|map)$ index.php [L] | |
</IfModule> | |
# enable gzip compression | |
<IfModule mod_deflate.c> | |
<IfModule mod_filter.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json application/xml image/svg+xml | |
</IfModule> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment