-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
37 lines (29 loc) · 1.19 KB
/
Copy path.htaccess
File metadata and controls
37 lines (29 loc) · 1.19 KB
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
36
37
# Catalyst project-root Apache fallback.
#
# Preferred deployment: configure the web server DocumentRoot to this project's
# public/ directory. This file exists for local/shared hosts that point Apache at
# the project root, such as a direct XAMPP htdocs install.
DirectoryIndex public/index.php
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Hide the implementation detail when a caller reaches /public directly.
RewriteCond %{THE_REQUEST} \s/+public/([^\s?]*) [NC]
RewriteRule ^public/(.*)$ /$1 [R=301,L,NE]
# Serve existing public files without exposing the project tree.
RewriteCond %{DOCUMENT_ROOT}/public/$1 -f
RewriteRule ^(.+)$ public/$1 [L]
RewriteCond %{DOCUMENT_ROOT}/public/$1 -d
RewriteRule ^(.+)$ public/$1 [L]
# Send all application routes to the public entry point.
RewriteRule ^$ public/index.php [L]
RewriteRule ^(.+)$ public/index.php [QSA,L]
</IfModule>
<FilesMatch "^(\.env|\.git|\.htaccess|composer\.json|composer\.lock|phpunit\.xml)$">
Require all denied
</FilesMatch>
<IfModule mod_authz_core.c>
<If "%{REQUEST_URI} =~ m#^/(app|boot-core|Repository|vendor|docs|Patch)/#">
Require all denied
</If>
</IfModule>