-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.htaccess
35 lines (29 loc) · 1.67 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
RewriteEngine On
# If you application is being run in PHP fastcgi environment, you don't have access to the Authorization header.
# Therefore the following lines provide copying of the Authorization header into the X-Authorization header.
# Finally in HTTP* classes there is a mechanism which initializes $_SERVER["PHP_AUTH_USER"] and $_SERVER["PHP_AUTH_PW"] from the X-Authorization header.
<IfModule mod_headers.c>
#RewriteCond %{HTTP:Authorization} ^Basic.*
RewriteRule (.*) - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RequestHeader set X-Authorization %{HTTP_AUTHORIZATION}e
</IfModule>
# http://app.localhost/public/dist/styles/application.min.v1507035144.css -> public/dist/styles/application.min.css
RewriteCond %{REQUEST_URI} ^\/public\/[^?]+\.v[0-9a-f]{1,64}\.[a-zA-Z0-9]{1,10}(|\?.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(public\/.+)\.v[0-9a-f]{1,64}(\.[a-zA-Z0-9]{1,10})$ $1$2 [L]
# silent redirecting /crossdomain.xml -> /public/crossdomain.xml; control file for flash player, acrobat reader and other adobe`s products
RewriteCond %{REQUEST_URI} ^\/crossdomain.xml(|\?.*)$
RewriteRule (.*) /public/crossdomain.xml [L]
# silent redirecting /favicon.ico -> /public/favicon.ico
RewriteCond %{REQUEST_URI} ^\/favicon.ico(|\?.*)$
RewriteRule (.*) /public/favicon.ico [L]
RewriteCond %{REQUEST_URI} ^\/
RewriteCond %{REQUEST_URI} !^\/public\/
RewriteCond %{REQUEST_URI} !^\/\.well-known\/
RewriteCond %{REQUEST_URI} !^\/server-status\/
RewriteCond %{REQUEST_URI} !^\/server-info\/
RewriteRule (.*) dispatcher.php [L]
# If one is solving a significant problem in PHP...
# php_flag display_errors on
# php_flag display_startup_errors on
# php_value error_reporting 4294967295