插件作者的标准出来了!Manyou诚邀开发者加盟!
“互联网平台开发者”特刊 有奖征集开发者
立即免费下载 Discuz!6.1.0正式版
Discuz! 6.1.0 使用说明
Discuz!NT2.5正式版发布
开放源码下载
UCenter Home 1.2 正式版发布
官方站 | 帮助文档
基于ECShop的网店托管-卖否
北京PHP就业培训热招 | LAMP培训大连
Discuz!收费服务内容及价格
《站长》杂志读者调查表
Discuz!/ECShop 专用官方虚拟主机
Insenz最新活动精美礼品大派送!
Comsenz 招聘信息
网店系统ECShop v2.6.0正式版火热发布
基于Discuz!的免费论坛空间5D6D
《站长》第七期:2008SNS进行时
返回列表 发新话题

apache2 独立主机uchome Rewrite 问题【在线等】

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>
复制代码
顶上去~~
:'( :'( :'( :'(
等个高人真难
(::20: (::20: (::20:
我是apache独立主机但是和你设的不一样,我为了方便,启用了.htaccess文件支持
顶楼上的兄弟,如果实在没办法,我可能也这么干了。
怎么设置的也请分享一下吧。

会者不难,希望高手指点。
继续等待~~~
我也有同样的问题~!
我的可以,你搞错地方了.
Apache 2.x 的用户请检查 conf/httpd.conf 中是否存在如下一段代码:
LoadModule rewrite_module modules/mod_rewrite.so


此时请务必注意,如果网站使用通过虚拟主机来定义
请务必加到虚拟主机配置,即 中去,如果加在虚拟主机配置外部将可能无法使用
改好后然后将 Apache 重启。

看好以上.官方说明,

我是如下设置.

<VirtualHost movip:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "D:/www/****.com/home"
    ServerName home.******.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common


RewriteEngine On
RewriteRule ^/(space|network)\-(.+)\.html$ /$1.php?rewrite=$2 [L]
RewriteRule ^/(space|network)\.html$ /$1.php [L]
RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L]

</VirtualHost>


*号那里是我的域名.我的uchome是放在home目录.其实如果你的放在根目录也是一样的,
返回列表