-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
160 lines (126 loc) · 4.99 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
RewriteEngine On
RewriteRule ^sitemap\.xml$ sitemap.php [L]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.peninsulanepal.com/$1 [R,L]
#RewriteRule ^honor /honour/index.html [L]
#AddType 'text/html; charset=UTF-8' html
# RewriteCond %{HTTP_HOST} !^www.hotelsevenstar.com.np$ [NC]
# RewriteRule ^(.*)$ https://www.hotelsevenstar.com.np/$1 [L,R=301]
#For home page. i.e. index.php
RewriteRule ^home$ index.php [L]
ErrorDocument 404 /index.php
#For Offer page. i.e. book.php
RewriteRule ^book/([a-zA-Z0-9-]+)/?$ book.php?slug=$1 [L]
#For inner pages.
#RewriteRule ^about-us/?$ about.php [L]
RewriteRule ^page/([a-zA-Z0-9-=_.]+)$ inner.php?slug=$1 [L]
#For gallery pages.
RewriteRule ^gallery-list/?$ gallery.php [L]
RewriteRule ^stay-cation/?$ offers.php [L]
#For contact pages.
RewriteRule ^contact-us/?$ contact.php [L]
#For reservation pages.c
RewriteRule ^reservation/?$ reservation.php [L]
#For news pages
RewriteRule ^news/([a-zA-Z0-9-]+)?$ news.php?slug=$1 [L]
RewriteRule ^news/?$ news_list.php [L]
RewriteRule ^news/page/([0-9]+)?$ news_list.php?pageno=$1 [L]
RewriteRule ^news/([0-9]+)/page/([0-9]+)?$ news_list.php?year=$1&pageno=$2 [L]
#For service pages.
RewriteRule ^service/([a-zA-Z0-9-]+)$ service_list.php?slug=$1 [L]
RewriteRule ^services/?$ service_list.php [L]
#For facilities pages.
RewriteRule ^facilities-list/?$ facilities.php [L]
#For facq pages.
RewriteRule ^faq/?$ faq.php [L]
#For career pages.
RewriteRule ^career-form/([a-zA-Z0-9-]+)?$ career-form.php?slug=$1 [L]
#For career-form pages.
#RewriteRule ^career/?$ career.php [L]
#For BLOG pages.
RewriteRule ^blog/?$ blog.php [L]
RewriteRule ^blog/([a-zA-Z0-9-=]+)$ blog.php?slug=$1 [L]
#For Package and Subpackage Details
#RewriteRule ^package/([a-zA-Z0-9-=]+)$ package.php?slug=$1 [L]
#RewriteRule ^subpackage/([a-zA-Z0-9-]+)$ subpkgdetail.php?slug=$1 [L]
#RewriteRule ^rooms/page/([0-9]+)?$ room_list.php?pageno=$1 [L]
#RewriteRule ^([a-zA-Z0-9-=]+)$ subpkgdetail.php?slug=$1 [L]
#RewriteRule ^([a-zA-Z0-9-=]+)/?$ package.php [L]
#For global page
RewriteRule ^([a-zA-Z0-9-=]+)/?$ global.php?slug=$1 [L]
## SEO ##
# Use PHP5.3 as default
#AddHandler application/x-httpd-php54 .php
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# File modified on Wed Jul 1 06:27:35 2015 by server
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value output_handler ob_gzhandler
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=216000, public, must-revalidate"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
# END Cache-Control Headers
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
</IfModule>
<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php81___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit