forked from boostorg/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
75 lines (58 loc) · 3.21 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
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddOutputFilter INCLUDES .html
AddType text/x-component .htc
DirectoryIndex index.php index.shtml index.html
# Override cache headers for the index files are updated more regularly than
# other html files.
<FilesMatch "index\.html|index\.php">
Header unset Cache-Control
Header unset Expires
</FilesMatch>
RewriteEngine On
RewriteBase /
########## Block Morfeus scanning
RewriteCond %{HTTP_USER_AGENT} ^Morfeus
RewriteRule ^.*$ - [F]
########## Redirect to the canonical URL.
RewriteCond %{HTTP_HOST} ^boost\.org [NC]
RewriteRule ^.*$ http://www\.boost\.org%{REQUEST_URI} [R=301]
########## Rewrites to serve up news pages.
RewriteRule ^users/news/(version_[-_\w]+)(\.html)?$ users/history/$1.html [L,R=301]
RewriteRule ^users/news/(version_\d+)\.(\d+)\.(\d+)$ users/history/$1_$2_$3.html [L,R=301]
RewriteRule ^users/download/(version_[-_\w]+)(\.html)?$ users/history/$1.html [L,R=301]
RewriteRule ^users/news/([-_\w]+)$ users/news/$1.html [L,R=301]
RewriteRule ^users/download/([-_\w]+)$ users/download/$1.html [L,R=301]
RewriteRule ^users/history/([-_\w]+)$ users/history/$1.html [L,R=301]
########## Rewrite rules to support the regression test links from the old site.
#~ RewriteRule ^regression/(.+)\.cpp$ http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/$1.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup [R,L]
RewriteRule ^regression/developement(/.*) development/tests/trunk$1 [R=permanent,L]
RewriteRule ^regression/release(/.*) http://engineering.meta-comm.com/boost-regression/1_34_1$1 [R,L]
RewriteRule ^regression/trunk(/.*) development/tests/trunk$1 [R=permanent,L]
RewriteRule ^regression-logs/?$ development/testing.html [R=permanent,L]
########## Shorter names for URL that must be printed during build process
RewriteRule ^getting_started_unix.html doc/libs/release/more/getting_started/unix-variants.html
RewriteRule ^getting_starged_windows.html doc/libs/release/more/getting_started/windows.html
########## Rewrite old site links to new locations.
# The boost header subdir, goes to the docs. Note, mod_rewrite is broken in some
# Apache versions. So we have to handle a rather strange translation of boost.png
# as a dir because it's somehow hardwired to replace /boost/* with /boost.png/*
# before *any* rewrite rules are checked. Which is just nasty!!
RewriteRule ^boost([.]png)?/(.*) doc/libs/release/boost/$2 [R=permanent,L]
# The libs subdirs
RewriteRule ^libs/([^./]+)$ doc/libs/release/libs/$1/ [R=permanent,L]
RewriteRule ^libs(/.*)?$ doc/libs/release/libs$1 [R=permanent,L]
# The people pages
RewriteRule ^people/people.htm users/people.html [R=permanent,L]
RewriteRule ^people/?$ users/people.html [R=permanent,L]
RewriteRule ^people/([^.]+) users/people/$1.html [R=permanent,L]
# The status pages, all go to the testing intro
RewriteRule ^status(.*) development/testing.html [R=permanent,L]
# The tools pages (todo)
RewriteRule ^tools(/.*)?$ doc/tools$1 [R=permanent,L]
# The wiki
RewriteRule ^wiki/?$ http://svn.boost.org/trac/boost [R,L]
# The license file. (This link was never correct, but it's common enough to require a redirect).
RewriteRule ^LICENSE-1.0$ LICENSE_1_0.txt [R=permanent,L]
########## Other redirects
RewriteRule ^b2/?$ /build/ [R=permanent,L]