-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
24 lines (24 loc) · 781 Bytes
/
.htaccess
File metadata and controls
24 lines (24 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<IfModule mod_env.c>
#Set Environment(development,testing,production)
SetEnv CI_ENV development
</IfModule>
<IfModule mod_rewrite.c>
# Disable index view
Options -Indexes
RewriteEngine On
#RewriteBase /foldername/
#if mod_env module not enabled in server
#Set Environment(development,testing,production)
RewriteRule ^ - [E=CI_ENV:development]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
#Enable SSL
#RewriteCond %{HTTPS} !=on
#RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
# Hide a specific file
<Files ~ "\.(env.*|json|config.js|md|gitignore|gitattributes|lock)$">
Order allow,deny
Deny from all
</Files>
</IfModule>