Skip to content

Commit

Permalink
include htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgio Comai authored and Giorgio Comai committed Jan 9, 2020
1 parent 4aa27d1 commit d9036ea
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
SetEnv APPLICATION_ENV "production"

RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]

# Strip any trailing slashes from incoming requests
RewriteCond %{REQUEST_URI} ^(.+)/+$
RewriteRule .* %1 [R=307,L]

# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting, the base path will be prepended to
# allow proper resolution of the index.php file; it will work
# in non-aliased environments as well, providing a safe, one-size
# fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]

# Block access to all .ini files.
<FilesMatch "\.ini$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
</FilesMatch>

php_value post_max_size 100M
php_value upload_max_filesize 100M

0 comments on commit d9036ea

Please sign in to comment.