-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.htaccess
108 lines (85 loc) · 4.14 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
<IfModule mod_speling.c>
CheckSpelling Off
</IfModule>
#Set expires dates...
<IfModule mod_expires.c>
ExpiresActive on
#Icon files (1 month)...
ExpiresByType image/vnd.microsoft.icon "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
#Images files (7 days)...
ExpiresByType image/jpg "access plus 7 days"
ExpiresByType image/gif "access plus 7 days"
ExpiresByType image/jpeg "access plus 7 days"
ExpiresByType image/png "access plus 7 days"
#CSS files (3 days)...
ExpiresByType text/css "access plus 3 days"
#JavaScript files (3 days)...
ExpiresByType application/javascript "access plus 3 days"
ExpiresByType application/x-javascript "access plus 3 days"
#All other files (24 hours)...
ExpiresDefault "access plus 24 hours"
</IfModule>
ErrorDocument 404 /404.php
<FilesMatch "\.inc$">
Order Deny,Allow
Deny from all
</FilesMatch>
#Redirect PAD download URL to current WinMerge version...
Redirect permanent /downloads/WinMerge-Setup.exe https://downloads.sourceforge.net/winmerge/WinMerge-2.16.46-Setup.exe
#Redirect HTTP to HTTPS and www.winmerge.org to winmerge.org...
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^winmerge\.org$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]
RewriteCond %{HTTP_HOST} ^www\.winmerge\.org$ [NC]
RewriteRule ^(.*)$ https://winmerge.org/$1 [R=permanent,L]
#CSS versioning...
RewriteEngine On
RewriteBase /
RewriteRule ^engine/css/(screen|print)-v[0-9]+.css$ /engine/css/$1.css [L]
#Move some pages to the GitHub Wiki...
Redirect permanent /about/history.php https://github.com/WinMerge/winmerge/wiki/Release-History
#Move old screenshot page to new one...
Redirect permanent /about/screenshots/ /screenshots/
#Move screenshot.png to new file...
Redirect permanent /about/screenshots/screenshot.png /screenshots/filecmp.png
Redirect permanent /screenshots/screenshot.png /screenshots/filecmp.png
#Move old source code pages to new ones...
Redirect permanent /about/license.php /source-code/
Redirect permanent /downloads/source-code.php /source-code/
#Move plugins page to download page...
Redirect permanent /downloads/plugins.php /downloads/
#Move old translations status to new one...
Redirect permanent /translations/status_branch.php /translations/
Redirect permanent /translations/status_branch_rss.php /translations/status-feed/
Redirect permanent /translations/status_trunk.php /translations/
Redirect permanent /translations/status_trunk_rss.php /translations/status-feed/
#Move translations instructions to GitHub...
Redirect permanent /translations/instructions.php https://github.com/WinMerge/winmerge/blob/master/Translations/README.md
#Move about page to start page...
Redirect permanent /about/ /
#Move manual to a own sub domain...
Redirect permanent /docs/manual/ https://manual.winmerge.org/en/
#Move forums to a own sub domain...
Redirect permanent /forums https://forums.winmerge.org/
#Tracker shortcuts...
RewriteEngine On
RewriteBase /
# Old number scheme:
RewriteRule ^bug/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
RewriteRule ^patch/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
RewriteRule ^support/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
RewriteRule ^rfe/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
RewriteRule ^todo/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
RewriteRule ^tracker/(\d{6,})$ https://sourceforge.net/support/tracker.php?aid=$1 [R=permanent]
# New number scheme:
RewriteRule ^bug/(\d{1,5})$ https://sourceforge.net/p/winmerge/bugs/$1/ [R=permanent]
RewriteRule ^patch/(\d{1,5})$ https://sourceforge.net/p/winmerge/patches/$1/ [R=permanent]
RewriteRule ^support/(\d{1,5})$ https://sourceforge.net/p/winmerge/support-requests/$1/ [R=permanent]
RewriteRule ^rfe/(\d{1,5})$ https://sourceforge.net/p/winmerge/feature-requests/$1/ [R=permanent]
RewriteRule ^todo/(\d{1,5})$ https://sourceforge.net/p/winmerge/todo/$1/ [R=permanent]
#XML Sitemap...
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ /sitemap.xml.php [L]