forked from ElliottLandsborough/dog-ceo-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
29 lines (25 loc) · 900 Bytes
/
.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
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
# Redirect users from / to a new place
#RewriteRule ^$ https://dog.ceo/dog-api [R=301,L]
# Block access to all dirs
RewriteRule ^bin/(.*)?$ /dog-api/ [R=301,L]
RewriteRule ^config/(.*)?$ /dog-api/ [R=301,L]
# Breaks stuff
#RewriteRule ^public/(.*)?$ /dog-api/ [R=301,L]
RewriteRule ^src/(.*)?$ /dog-api/ [R=301,L]
RewriteRule ^tests/(.*)?$ /dog-api/ [R=301,L]
RewriteRule ^var/(.*)?$ /dog-api/ [R=301,L]
RewriteRule ^vendor/(.*)?$ /dog-api/ [R=301,L]
# rewrite all requests to /api/public/index.php
RewriteBase /api/public/
RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.*)$ index.php [QSA,L]
RewriteRule . index.php [L]
</IfModule>
# All files ending in these exts:
<FilesMatch ".json|.lock|.dist|.md">
Order Deny,Allow
Deny from all
</FilesMatch>