summaryrefslogtreecommitdiffstats
path: root/htaccess.dist
blob: cf0676949e4bd13012995f87343153812b5e3636 (plain)
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
RewriteEngine On
RewriteBase BASE/

###
#### main blog
###

RewriteRule ^templates/(.*)				BASE/wp-inst/wp-content/blogs/main/templates/$1 [L]
RewriteRule ^files/(.*)                  		BASE/wp-inst/wp-content/blogs/files/$1 [L]
RewriteRule ^wp-content/themes/(.*)			BASE/wp-inst/wp-content/themes/$1 [L]

# rewrite these
RewriteRule ^category/(.*)/page/(.*)/                   BASE/wp-inst/index.php?wpblog=main&category_name=$1&paged=$2 [L]
RewriteRule ^category/(.*)/(feed|rdf|rss|rss2|atom)/?$  BASE/wp-inst/wp-feed.php?wpblog=main&category_name=$1&feed=$2 [L]
RewriteRule ^category/?(.*)                             BASE/wp-inst/index.php?wpblog=main&category_name=$1 [L]
RewriteRule ^author/(.*)/(feed|rdf|rss|rss2|atom)/?$    BASE/wp-inst/wp-feed.php?wpblog=main&author_name=$1&feed=$2 [L]
RewriteRule ^author/?(.*)                               BASE/wp-inst/index.php?wpblog=main&author_name=$1 [L]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$          BASE/wp-inst/index.php?wpblog=main&year=$1&monthnum=$2&day=$3&name=$4&page=$5 [L]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ BASE/wp-inst/wp-feed.php?wpblog=main&year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [L]
RewriteRule ^([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$                BASE/wp-inst/wp-trackback.php?wpblog=main&year=$1&monthnum=$2&day=$3&name=$4 [L]
RewriteRule ^page/?([0-9]+)?/?$ 			BASE/wp-inst/index.php?wpblog=main&paged=$1 [QSA]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$                    BASE/wp-inst/wp-feed.php?wpblog=main&feed=$1 [L]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$           BASE/wp-inst/wp-feed.php?wpblog=main&feed=$1&withcomments=1 [L]
RewriteRule ^archives/p/([0-9]+)/?(.*)?                 BASE/wp-inst/index.php?wpblog=main&redirect=yes&p=$1 [L]
RewriteRule ^archives/cat/([0-9]+)/?(.*)?               BASE/wp-inst/index.php?wpblog=main&redirect=yes&cat=$1 [L]
RewriteRule ^archives/m/([0-9]+)\#?(.*)?                BASE/wp-inst/index.php?wpblog=main&redirect=yes&m=$1 [L]
RewriteRule ^b2rss2.php(.*)?                            BASE/wp-inst/wp-feed.php?wpblog=main&feed=rss2 [L]
RewriteRule ^b2rdf.php(.*)?                             BASE/wp-inst/wp-feed.php?wpblog=main&feed=rdf [L]

# We want to pass these files straight through
RewriteRule ^wp-comments-post.php(.*)  			BASE/wp-inst/wp-comments-post.php       [L]
RewriteRule ^go.php(.*) 				BASE/wp-inst/go.php$1 [L]
RewriteRule ^pages/(.*) 				BASE/wp-inst/pages/$1 [L]
RewriteRule ^wp-admin/(.*) 				BASE/wp-inst/wp-admin/$1 [L]
RewriteRule ^wp-atom.php(.*) 				BASE/wp-inst/wp-atom.php [L]
RewriteRule ^wp-comments-popup.php(.*) 			BASE/wp-inst/wp-comments-popup.php [L]
RewriteRule ^wp-comments-post.php(.*) 			BASE/wp-inst/wp-comments-post.php [L]
RewriteRule ^wp-commentsrss2.php(.*) 			BASE/wp-inst/wp-commentsrss2.php [L]
RewriteRule ^wp-counter.php(.+)? 			BASE/wp-inst/wp-counter.php [L]
RewriteRule ^wp-feed.php(.*) 				BASE/wp-inst/wp-feed.php [L]
RewriteRule ^wp-images/(.*) 				BASE/wp-inst/wp-images/$1 [L]
RewriteRule ^wp-links-opml.php(.*) 			BASE/wp-inst/wp-links-opml.php [L]
RewriteRule ^wp-login.php(.*) 				BASE/wp-inst/wp-login.php [L]
RewriteRule ^wp-mail.php(.*)	 			BASE/wp-inst/wp-mail.php [L]
RewriteRule ^wp-pass.php(.*) 				BASE/wp-inst/wp-pass.php [L]
RewriteRule ^wp-rdf.php(.*) 				BASE/wp-inst/wp-rdf.php [L]
RewriteRule ^wp-register.php(.*) 			BASE/wp-inst/wp-register.php [L]
RewriteRule ^wp-rss.php(.*)	 			BASE/wp-inst/wp-rss.php [L]
RewriteRule ^wp-rss2.php(.*) 				BASE/wp-inst/wp-rss2.php [L]
RewriteRule ^wp-sidebar.php(.*) 			BASE/wp-inst/wp-sidebar.php [L]
RewriteRule ^wp-trackback.php(.*) 			BASE/wp-inst/wp-trackback.php [L]
RewriteRule ^xmlrpc.php(.*) 				BASE/wp-inst/xmlrpc.php [L]   
RewriteRule ^maintenance.php 				BASE/wp-inst/maintenance.php [L]   
RewriteRule ^favicon.ico /wp-inst/favicon.ico [L]   
RewriteRule ^robots.txt /wp-inst/robots.txt [L]   

RewriteRule ^wp-newblog.php				BASE/wp-inst/wp-newblog.php [L]
RewriteRule ^index.php					BASE/wp-inst/index.php [L]

RewriteRule ^$ BASE/wp-inst/index.php [L]

###
#### blogs
###
RewriteRule ^([_0-9a-z-]+)/templates/(.*)			BASE/wp-inst/wp-content/blogs/$1/templates/$2 [L]
RewriteRule ^([_0-9a-z-]+)/files/(.*)				BASE/wp-inst/wp-content/blogs/$1/files/$2 [L]
RewriteRule ^([_0-9a-z-]+)/wp-content/blogs/(.*)/files/(.*)	BASE/wp-inst/wp-content/blogs/$1/files/$3 [L]
RewriteRule ^([_0-9a-z-]+)/wp-content/themes/(.*)		BASE/wp-inst/wp-content/themes/$2 [L]

# rewrite these
RewriteRule ^([_0-9a-z-]+)/category/(.*)/page/(.*)/                   BASE/wp-inst/index.php?wpblog=$1&category_name=$2&paged=$3 [L]
RewriteRule ^([_0-9a-z-]+)/category/(.*)/(feed|rdf|rss|rss2|atom)/?$  BASE/wp-inst/wp-feed.php?wpblog=$1&category_name=$2&feed=$3 [L]
RewriteRule ^([_0-9a-z-]+)/category/?(.*)                             BASE/wp-inst/index.php?wpblog=$1&category_name=$2 [L]
RewriteRule ^([_0-9a-z-]+)/author/(.*)/(feed|rdf|rss|rss2|atom)/?$    BASE/wp-inst/wp-feed.php?wpblog=$1&author_name=$2&feed=$3 [L]
RewriteRule ^([_0-9a-z-]+)/author/?(.*)                               BASE/wp-inst/index.php?wpblog=$1&author_name=$2 [L]
RewriteRule ^([_0-9a-z-]+)/([0-9]{4})/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$          BASE/wp-inst/index.php?wpblog=$1&year=$2&monthnum=$3&day=$4&name=$5&page=$6 [L]
RewriteRule ^([_0-9a-z-]+)/([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ BASE/wp-inst/wp-feed.php?wpblog=$1&year=$2&monthnum=$3&day=$4&name=$5&feed=$6 [L]
RewriteRule ^([_0-9a-z-]+)/([0-9]{4})/?([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$                BASE/wp-inst/wp-trackback.php?wpblog=$1&year=$2&monthnum=$3&day=$4&name=$5 [L]
RewriteRule ^([_0-9a-z-]+)/page/?([0-9]+)?/?$ 			      BASE/wp-inst/index.php?paged=$2 [QSA]
RewriteRule ^([_0-9a-z-]+)/feed/?([_0-9a-z-]+)?/?$                    BASE/wp-inst/wp-feed.php?wpblog=$1&feed=$2 [L]
RewriteRule ^([_0-9a-z-]+)/comments/feed/?([_0-9a-z-]+)?/?$           BASE/wp-inst/wp-feed.php?wpblog=$1&feed=$2&withcomments=1 [L]
RewriteRule ^([_0-9a-z-]+)/archives/p/([0-9]+)/?(.*)?                 BASE/wp-inst/index.php?wpblog=$1&redirect=yes&p=$2 [L]
RewriteRule ^([_0-9a-z-]+)/archives/cat/([0-9]+)/?(.*)?               BASE/wp-inst/index.php?wpblog=$1&redirect=yes&cat=$2 [L]
RewriteRule ^([_0-9a-z-]+)/archives/m/([0-9]+)\#?(.*)?                BASE/wp-inst/index.php?wpblog=$1&redirect=yes&m=$2 [L]
RewriteRule ^([_0-9a-z-]+)/b2rss2.php(.*)?                            BASE/wp-inst/wp-feed.php?wpblog=$1&feed=rss2 [L]
RewriteRule ^([_0-9a-z-]+)/b2rdf.php(.*)?                             BASE/wp-inst/wp-feed.php?wpblog=$1&feed=rdf [L]

# We want to pass these files straight through
RewriteRule ^([_0-9a-z-]+)/wp-comments-post.php(.*)  		BASE/wp-inst/wp-comments-post.php       [L]
RewriteRule ^([_0-9a-z-]+)/go.php(.*) 				BASE/wp-inst/go.php$2 [L]
RewriteRule ^([_0-9a-z-]+)/pages/(.*)	 			BASE/wp-inst/pages/$2 [L]
RewriteRule ^([_0-9a-z-]+)/wp-admin/(.*) 			BASE/wp-inst/wp-admin/$2 [L]
RewriteRule ^([_0-9a-z-]+)/wp-atom.php(.*) 			BASE/wp-inst/wp-atom.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-comments-popup.php(.*) 		BASE/wp-inst/wp-comments-popup.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-comments-post.php(.*) 		BASE/wp-inst/wp-comments-post.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-commentsrss2.php(.*) 		BASE/wp-inst/wp-commentsrss2.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-counter.php(.+)? 			BASE/wp-inst/wp-counter.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-feed.php(.*) 			BASE/wp-inst/wp-feed.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-images/(.*) 			BASE/wp-inst/wp-images/$2 [L]
RewriteRule ^([_0-9a-z-]+)/wp-links-opml.php(.*) 		BASE/wp-inst/wp-links-opml.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-login.php(.*) 			BASE/wp-inst/wp-login.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-mail.php(.*) 			BASE/wp-inst/wp-mail.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-pass.php(.*) 			BASE/wp-inst/wp-pass.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-rdf.php(.*) 			BASE/wp-inst/wp-rdf.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-register.php(.*) 			BASE/wp-inst/wp-register.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-rss.php(.*) 			BASE/wp-inst/wp-rss.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-rss2.php(.*) 			BASE/wp-inst/wp-rss2.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-sidebar.php(.*) 			BASE/wp-inst/wp-sidebar.php [L]
RewriteRule ^([_0-9a-z-]+)/wp-trackback.php(.*) 		BASE/wp-inst/wp-trackback.php [L]
RewriteRule ^([_0-9a-z-]+)/xmlrpc.php(.*) 			BASE/wp-inst/xmlrpc.php [L]   
RewriteRule ^([_0-9a-z-]+)/maintenance.php 			BASE/wp-inst/maintenance.php [L]   
RewriteRule ^([_0-9a-z-]+)/favicon.ico /wp-inst/favicon.ico [L]   

# pages
RewriteCond REALPATH/wp-inst/wp-content/blogs/%{1} -d
RewriteRule ^([_0-9a-z-]+)/(.*)/$				BASE/wp-inst/index.php?pagename=$2 [L]

RewriteRule ^(.*)/$						BASE/wp-inst/index.php?pagename=$1 [L]

# catch all rules
RewriteCond REALPATH/wp-inst/wp-content/blogs/%{1} -d
RewriteRule ^([_0-9a-z-]+)/                            BASE/wp-inst/index.php [L]

RewriteRule ^([_0-9a-z-]+)/(.+)$ BASE/wp-inst/$2 [L]

RewriteCond %{REQUEST_FILENAME}  -d
RewriteRule ^(.+[^/])$                            BASE/ [R,L]
RewriteCond REALPATH/wp-inst/wp-content/blogs/%{1} -d
RewriteRule ^(.*[^/])$                            BASE/$1/ [R,L]

AddType text/css .css