1. Pseudo-static configuration parameters for Apache under Discuz:
Apache Web Server (standalone host user)
<ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/topic-(. +) \.html$ $1/portal.php?mod=topic&topic=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/article-([0-9]+)-([0-9]+) \.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/forum-(\w+)-([0-9]+) \.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/thread-([0-9]+)-([0-9]+)-([0-9]+] \.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page \%3d$4&page=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/group-([0-9]+)-([0-9]+) \.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/space-(USERNAME|UID)-(. +) \.html$ $1/home.php?mod=space&$2=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/blog-([0-9]+)-([0-9]+) \.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/(Fid|tid)-([0-9]+) \.html$ $1/index.php?action=$2&value=$3&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ (. *)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+) \.html$ $1/plugin.php?id=$2:$3&%1
</IfModule>
Apache Web Server (Virtual host user)
# Open the Rewriteengine mode
Rewriteengine on
# Modify the/discuz in the following statement as your forum directory address, if the program is placed in the root directory, please change/discuz to/
Rewritebase/discuz
# Rewrite System rules do not modify
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^topic-(. +) \.html$ portal.php?mod=topic&topic=$1&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^article-([0-9]+)-([0-9]+) \.html$ portal.php?mod=view&aid=$1&page=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^forum-(\w+)-([0-9]+) \.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^thread-([0-9]+)-([0-9]+)-([0-9]+] \.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3d$3 &page=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^group-([0-9]+)-([0-9]+) \.html$ forum.php?mod=group&fid=$1&page=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^space-(Username|uid)-(. +) \.html$ home.php?mod=space&$1=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^blog-([0-9]+)-([0-9]+) \.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^archiver/(Fid|tid)-([0-9]+) \.html$ archiver/index.php?action=$1&value=$2&%1
Rewritecond%{query_string} ^ (. *) $
Rewriterule ^ ([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+) \.html$ plugin.php?id=$1:$2&%1
Nginx Web Server
rewrite ^ ([^\.] *)/topic-(. +) \.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^ ([^\.] *)/article-([0-9]+)-([0-9]+) \.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^ ([^\.] *)/forum-(\w+)-([0-9]+) \.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^ ([^\.] *)/thread-([0-9]+)-([0-9]+)-([0-9]+] \.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3d$4&page =$3 last;
rewrite ^ ([^\.] *)/group-([0-9]+)-([0-9]+) \.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^ ([^\.] *)/space-(USERNAME|UID)-(. +) \.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^ ([^\.] *)/blog-([0-9]+)-([0-9]+) \.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
rewrite ^ ([^\.] *)/(Fid|tid)-([0-9]+) \.html$ $1/index.php?action=$2&value=$3 last;
rewrite ^ ([^\.] *)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+) \.html$ $1/plugin.php?id=$2:$3 last;
if (!-e $request _filename) {
return 404;
}
Web pseudo-static configuration