-
Notifications
You must be signed in to change notification settings - Fork 4
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
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.
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,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 |