-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
23 lines (20 loc) · 930 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
RewriteEngine On
RewriteRule ^index.php$ %{REQUEST_SCHEME}://%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^index.htm$ %{REQUEST_SCHEME}://%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^index.html$ %{REQUEST_SCHEME}://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{THE_REQUEST} ^((?!index).)*$ [NC]
RewriteRule ^(.*)/$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{THE_REQUEST} ^((?!index).)*$ [NC]
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{THE_REQUEST} ^.*php [NC]
RewriteCond %{THE_REQUEST} ^((?!excluded-subpage).)*$ [NC]
RewriteCond %{THE_REQUEST} ^((?!api/excluded-subpage).)*$ [NC]
RewriteCond %{THE_REQUEST} ^((?!index).)*$ [NC]
RewriteRule ^(.+)\.php$ %{REQUEST_SCHEME}://%{HTTP_HOST}/$1/ [L,R=301]
RewriteRule ^([a-z]+)/$ /$1.php [L]