http://u.discuz.net/help/index.p ... 4%D6%C3%CB%B5%C3%F7
按照上面的办法进行了设置,但是无法生效。但dz已经实现伪静态并可访问。
确认Apache 2.x 的conf/httpd.conf 中是存在如下代码:
LoadModule rewrite_module modules/mod_rewrite.so
由于我定义了虚拟主机,所以相关配置放在httpd-vhosts.conf下,以下是文件内容。麻烦高手指出错误,帮助我uchome静态化。我的站点
http://www.g5wan.com/uchome# PHPnow.org - vhosts
<Directory "../vhosts">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
NameVirtualHost *
<Directory "D:/PHPnow/g5wan">
Allow from all
</Directory>
<VirtualHost *>
ServerAdmin admin@g5wan.com
DocumentRoot D:/PHPnow/g5wan
ServerName g5wan.com:80
ServerAlias *.g5wan.com
ErrorLog logs/g5wan.com-error_log
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
RewriteEngine On
RewriteRule ^/uchome/(space|network)\-(.+)\.html$ /$1.php?Rewrite=$2 [L]
RewriteRule ^/uchome/(space|network)\.html$ /$1.php [L]
RewriteRule ^/uchome/([0-9]+)$ /space.php?uid=$1 [L]
</IfModule>
</VirtualHost>复制代码