0%

WordPress 及 discuz 整合的httpd.ini 伪静态文件

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
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32


RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=view&aid=$2&page=$3&$4
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4

RewriteRule /wordpress/sitemap.xml /wordpress/sitemap.xml [L]
RewriteRule /wordpress/favicon.ico /wordpress/favicon.ico [L]
# For tag
RewriteRule /wordpress/tag/(.*)/page/(\d+)$ /wordpress/index\.php\?tag=$1&paged=$2
RewriteRule /wordpress/tag/(.+)$ /wordpress/index\.php\?tag=$1
# For category
RewriteRule /wordpress/category/(.*)/page/(\d+)$ /wordpress/index\.php\?category_name=$1&paged=$2
RewriteRule /wordpress/category/(.*) /wordpress/index\.php\?category_name=$1
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wordpress/wp-(.*) /wordpress/wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/wordpress/$ /wordpress/index.php [L]
RewriteRule /wordpress/(.*) /wordpress/index.php/$1 [L]
#For page
RewriteRule /wordpress/page/(.*)/?s=(.*) /wordpress/index\.php\?s=$2&paged=$1
RewriteRule /wordpress/page/(.*) /wordpress/index\.php\?paged=$1

直接放到网站根目录下
此为根目录为Discuz, 根目录\wordpress 的组合。