-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
53 lines (41 loc) · 1.6 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
Options +FollowSymLinks
IndexIgnore */*
<IfModule mod_rewrite.c>
RewriteEngine on
#The following is not needed, because every page has a canonical tag so that correct url is submited to the search engines
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !index.php
#RewriteCond %{REQUEST_URI} !index.html
#RewriteCond %{REQUEST_URI} !admincms/(.*)$
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ^(.*)$ http://www.apartmentslanka.com/$1/ [L,R=301]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
# Redirect direct requests to index.php
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.apartmentslanka.com/$1 [R=301,L]
</IfModule>
Redirect 301 /nuwaraeliya/mistyhills http://www.apartmentslanka.com/nuwaraeliya-mistyhills/hotel
Redirect 301 /home http://www.apartmentslanka.com
# Leverage Browser Caching
ExpiresActive On
<FilesMatch "\.(js|css|mp3|flv)$">
ExpiresDefault A2419200
</FilesMatch>
# Image Browser Caching
<FilesMatch "\.(ico|gif|GIF|jpg|JPG|jpeg|png|PNG)$">
ExpiresDefault A7776000
</FilesMatch>
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# No GZIP compress for all IE
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# IE5.x and IE6 get no gzip, but allow 7+
BrowserMatch \bMSIE\s(7|8) !no-gzip !gzip-only-text/html