-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.htaccess
32 lines (26 loc) · 855 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
30
31
32
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect www to non-www and enforce HTTPS
RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://acjobsph.com%{REQUEST_URI} [L,R=301,NE]
# Redirect requests to public directory
RewriteCond %{REQUEST_URI} !^/public
RewriteRule ^(.*)$ /public/$1 [L]
# Handle Laravel routing for non-existing directories and files
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
# Disable Directory listing
Options -Indexes
# Block files which need to be hidden
<Files ~ "\.(env|config.js|md|gitignore|gitattributes|lock|example)$">
Order allow,deny
Deny from all
</Files>
# # Block specific files
# <Files "artisan">
# Order allow,deny
# Deny from all
# </Files>