-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
42 lines (32 loc) · 1.2 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
#Caching schema
<FilesMatch "\.(htm|html|php|css|js)$">
Header set Cache-Control "no-cache,no-store, must-revalidate, max-age=0"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>
#deny direct access to documents
<FilesMatch "\.(pdf|pptx)$">
order allow,deny
deny from all
</FilesMatch>
# serve first available alternate default index page from series
DirectoryIndex login.php index.php home.php
#Prevent directory listings
Options All -Indexes
# prevent folder listing
#IndexIgnore *
#URL Rewrites
RewriteEngine On
RewriteCond %{REQUEST_URI} .*\.(phpx)$
RewriteRule ^(.*)/(.*)/(.*)\.phpx public_html/$1/$3.php [L]
#RewriteCond %{REQUEST_URI} .*-php-id=(.*)$
#RewriteRule ^(.*)/(.*)/(.*)-(.*)-php-id=(.*)$ public_html/$1/$4.php?id=$5 [L]
#RewriteCond %{REQUEST_URI} .*\.(php)$
#RewriteRule ^(.*)/(.*)/(.*)/(.*)\.php public_html/$1/$2.php [L]
RewriteCond %{REQUEST_URI} !.*\.(css|jpg|gif|png|js|php)$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) http://localhost/sms1/$1/ [R]
RewriteCond %{REQUEST_URI} !.*\.(css|jpg|gif|png|js|php)$
RewriteRule ^(.*)/$ public_html/$1.php [L]
#Includes
#php_value include_path ../../includes/