-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
44 lines (26 loc) · 1.08 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
36
37
38
39
40
41
42
43
<IfModule mod_rewrite.c>
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
#Options FollowSymLinks
RewriteEngine on
### HANDLE FOR THE PUBLIC DIRECTORY AND FILE
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !^(public/|index\.php) [NC,F]
################################################
#### HANDLE FOR SUBDOMAIN URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^([\w\-]+)\.([\w\-]+(\.[\w]+){0,1}) [NC]
RewriteRule ^((?s).*)$ index.php?_uri=/$1&_subdomain=%1&_host=%2 [QSA,L]
##################################################
#### HANDLE FOR NON SUBDOMAIN URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^([\w\-]+(\.[\w]+){0,1}) [NC]
RewriteRule ^((?s).*)$ index.php?_uri=/$1&_host=%1 [QSA,L]
#####################################################3
#RewriteCond %{HTTP_HOST} ^(^.*)\.(.+)
#RewriteRule (.*) index.php?_subdomain=%1
#RewriteRule ^([a-z0-9\-]+)/([a-z0-9\-]+)/?$ index.php?c=$1&d=$2 [NC,L]
</IfModule>