Created the Apache recipe.

This commit is contained in:
Ricardo de Vries
2017-11-30 16:10:49 +01:00
parent 2c32d50410
commit b0cf5a18da
2 changed files with 37 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
{
"copy-from-recipe": {
"public/": "%PUBLIC_DIR%/"
},
"aliases": ["apache-config", "htaccess"]
}
+31
View File
@@ -0,0 +1,31 @@
DirectoryIndex index.php
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
# When mod_rewrite is not available, we instruct a temporary redirect
# explicitly so that the website and the generated links can still be used.
RedirectMatch 302 ^/$ /index.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>