This repository has been archived by the owner on Dec 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.htaccess
147 lines (129 loc) · 6.32 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
# txt2tags Apache configuration
#
# PLEASE DO NOT EDIT IF YOU ARE NOT 100% SURE
# Show directory listings when index.html is not found
Options +Indexes
# Set the default character set
AddDefaultCharset UTF-8
# DreamHost: do not execute /txt2tags.py, just show its contents
RemoveHandler .py
# Linking files directly from GitHub
# Note: These used to be symlinks in my local folder
Redirect temp /po https://raw.githubusercontent.com/txt2tags/txt2tags/master/po
Redirect temp /sample.t2t https://raw.githubusercontent.com/txt2tags/txt2tags/master/samples/sample.t2t
Redirect temp /test https://raw.githubusercontent.com/txt2tags/txt2tags/master/test/http/web
Redirect temp /tools http://txt2tags.googlecode.com/svn/trunk/extras
Redirect temp /txt2tags https://raw.githubusercontent.com/txt2tags/txt2tags/2.6/txt2tags
Redirect temp /txt2tags.py https://raw.githubusercontent.com/txt2tags/txt2tags/2.6/txt2tags
Redirect temp /txt2tags-0.1.py.txt https://raw.githubusercontent.com/txt2tags/old/master/txt2tags-0.1.py
# Moved files
Redirect permanent /comments.php http://txt2tags.wordpress.com/user-comments/
Redirect permanent /txt2tags.rss http://txt2tags.wordpress.com/feed/
Redirect permanent /oldnews.html /misc/oldnews.html
Redirect permanent /oldnews.t2t /misc/oldnews.t2t
Redirect permanent /site.css /inc/site.css
Redirect permanent /userguide/userguide.html /userguide/
Redirect permanent /v2-news.html /v2/news.html
Redirect permanent /v2-news.t2t /v2/news.t2t
Redirect permanent /v2-upgrade.html /v2/upgrade.html
Redirect permanent /v2-upgrade.t2t /v2/upgrade.t2t
Redirect permanent /v2.html /v2/index.html
Redirect permanent /v2.t2t /v2/index.t2t
# User Guide titles are now lowercased
Redirect permanent /userguide/Encoding.html /userguide/encoding.html
Redirect permanent /userguide/Options.html /userguide/options.html
Redirect permanent /userguide/PostProc.html /userguide/postproc.html
Redirect permanent /userguide/PreProc.html /userguide/preproc.html
Redirect permanent /userguide/Style.html /userguide/style.html
Redirect permanent /userguide/Target.html /userguide/target.html
# Portuguese User Guide has a new filemane
Redirect permanent /pt/guia-usuario.html /pt/userguide-pt.html
Redirect permanent /pt/guia-usuario.t2t /pt/userguide-pt.t2t
# Portuguese version of the website is gone (except docs)
Redirect gone /pt/PageMaker-HOWTO.html
Redirect gone /pt/art.html
Redirect gone /pt/art.t2t
Redirect gone /pt/changelog.html
Redirect gone /pt/changelog.t2t
Redirect gone /pt/docs.html
Redirect gone /pt/docs.t2t
Redirect gone /pt/download.html
Redirect gone /pt/download.t2t
Redirect gone /pt/features.html
Redirect gone /pt/features.t2t
Redirect gone /pt/index.t2t
Redirect gone /pt/irc-11set.html
Redirect gone /pt/irc-11set.t2t
Redirect gone /pt/ml.html
Redirect gone /pt/ml.t2t
Redirect gone /pt/online.t2t
Redirect gone /pt/sample-full.t2t
Redirect gone /pt/shots.html
Redirect gone /pt/shots.t2t
Redirect gone /pt/team.html
Redirect gone /pt/team.t2t
Redirect gone /pt/tools.html
Redirect gone /pt/tools.t2t
Redirect gone /pt/txt2tags
Redirect gone /pt/txt2tags-pt.rss
Redirect gone /pt/v23-news.html
Redirect gone /pt/v23-news.t2t
# Save some old Portuguese pages for reference
Redirect permanent /pt/enquete.html /misc/pt-enquete.html
Redirect permanent /pt/enquete.t2t /misc/pt-enquete.t2t
Redirect permanent /pt/comments.html /misc/pt-comentarios.html
Redirect permanent /pt/comments.t2t /misc/pt-comentarios.t2t
# Redirect some important old Portuguese pages to the english version
RedirectMatch permanent ^/pt/?$ /
Redirect permanent /pt/index.html /
Redirect permanent /pt/online.php /online.php
# Old stuff that's gone
Redirect gone /donate.t2t
Redirect gone /donate.html
Redirect gone /src/
Redirect gone /rss.sed
Redirect gone /v2.conf
### BEWARE! Rewrite magic ahead ###
#
# The following rules are needed to avoid symlinks inside the website folder.
# The /doc folder is in fact a "git clone" of the /txt2tags/doc repository.
RewriteEngine on
RewriteBase /
# Map language codes to the respective folder inside /doc
# Note: Using Rewrite instead Redirect to preserve the code at the URL.
# Note: this is legacy, but some scripts depend on the code at the URL.
RewriteRule ^ca/(.*)$ doc/Catalan/$1 [L]
RewriteRule ^cs/(.*)$ doc/Czech/$1 [L]
RewriteRule ^de/(.*)$ doc/German/$1 [L]
RewriteRule ^de_LU/(.*)$ doc/Luxembourgish/$1 [L]
RewriteRule ^eo/(.*)$ doc/Esperanto/$1 [L]
RewriteRule ^es/(.*)$ doc/Spanish/$1 [L]
RewriteRule ^eu/(.*)$ doc/Basque/$1 [L]
RewriteRule ^fi/(.*)$ doc/Finnish/$1 [L]
RewriteRule ^fr/(.*)$ doc/French/$1 [L]
RewriteRule ^hu/(.*)$ doc/Hungarian/$1 [L]
RewriteRule ^it/(.*)$ doc/Italian/$1 [L]
RewriteRule ^ja/(.*)$ doc/Japanese/$1 [L]
RewriteRule ^pt/(.*)$ doc/Portuguese/$1 [L]
RewriteRule ^ru/(.*)$ doc/Russian/$1 [L]
RewriteRule ^sv/(.*)$ doc/Swedish/$1 [L]
RewriteRule ^uk/(.*)$ doc/Ukrainian/$1 [L]
RewriteRule ^zh/(.*)$ doc/Chinese/$1 [L]
# Map english docs to the root folder
# Note: this is legacy, but ok since it makes shorter URLs for the main docs.
RewriteRule ^manpage\.t2t$ doc/English/manpage.t2t [L]
RewriteRule ^rules\.conf$ doc/English/rules/rules.conf [L]
RewriteRule ^rules\.html$ doc/English/rules.html [L]
RewriteRule ^rules\.t2t$ doc/English/rules.t2t [L]
RewriteRule ^txt2tags-quickref\.odt$ doc/English/txt2tags-quickref.odt [L]
RewriteRule ^txt2tags-quickref\.pdf$ doc/English/txt2tags-quickref.pdf [L]
RewriteRule ^userguide/userguide\.css$ doc/English/userguide/userguide.css [L]
RewriteRule ^userguide/userguide\.pdf$ doc/English/userguide.pdf [L]
RewriteRule ^userguide/userguide\.t2t$ doc/English/userguide/userguide.t2t [L]
RewriteRule ^writing-book\.html$ doc/English/writing-book.html [L]
RewriteRule ^writing-book\.t2t$ doc/English/writing-book.t2t [L]
# # Map userguide images to the /img folder
# # Note: This is legacy. Not used anymore.
# RewriteRule ^img/gui\.png$ doc/English/userguide/gui.png [L]
# RewriteRule ^img/vim\.png$ doc/English/userguide/vim.png [L]
# RewriteRule ^img/web\.png$ doc/English/userguide/web.png [L]