[提问]
GD 150G linxu空间安装dz 7.2无法实现伪静态
|
|
- # 将 RewriteEngine 模式打开
- RewriteEngine On
- # 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
- RewriteBase /
- # Rewrite 系统规则请勿修改
- RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1
- RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
- RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
- RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
- RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
复制代码 这是从DZ官方抄来的 Rewrite规则, .htaccess放到安装论坛的BBS目录后,在DZ后台开启伪静态如下图,但是之后除了首页能打开外其他页面都是404错误,.htaccess已经上传5-6个小时了还是不能用
求各位高手指教!
|
|
|
|
|
|
|
|
|
|
|
vista32
发表于 2009-12-2 22:32:36
|
显示全部楼层
另外,我在网上找了一个空间防盗链的规则,放到空间根目录后也不起任何作用,以下为该.htaccess得内容- <IfModule mod_rewrite.c>
- RewriteEngine on
- RewriteCond %{REQUEST_URI} ^/abc/(404|error)
- RewriteCond %{HTTP_REFERER} !^$ [NC]
- RewriteCond %{HTTP_REFERER} !^$
- RewriteCond %{HTTP_REFERER} !www.warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !wow.warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !home.warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !bbs.warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !shop.warmmx.com [NC]
- RewriteCond %{HTTP_REFERER} !www.google.com [NC]
- RewriteCond %{HTTP_REFERER} !google.com [NC]
- RewriteCond %{HTTP_REFERER} !www.google.cn [NC]
- RewriteCond %{HTTP_REFERER} !google.cn [NC]
- RewriteCond %{HTTP_REFERER} !www.baidu.com [NC]
- RewriteCond %{HTTP_REFERER} !www.baidu.cn [NC]
- RewriteCond %{HTTP_REFERER} !baidu.com [NC]
- RewriteCond %{HTTP_REFERER} !baidu.cn [NC]
- RewriteCond %{HTTP_REFERER} !bloglines.com [NC]
- RewriteCond %{HTTP_REFERER} !www.ask.com [NC]
- RewriteCond %{HTTP_REFERER} !www.163.com [NC]
- RewriteCond %{HTTP_REFERER} !www.yahoo.com [NC]
- RewriteCond %{HTTP_REFERER} !www.sogou.com [NC]
- RewriteCond %{HTTP_REFERER} !www.soso.com [NC]
- RewriteCond %{HTTP_REFERER} !www.sina.com.cn [NC]
- RewriteCond %{HTTP_REFERER} !www.msn.com [NC]
- RewriteCond %{HTTP_REFERER} !www.feedsky.com [NC]
- RewriteCond %{HTTP_REFERER} !www.feedburner.com [NC]
- RewriteRule .(jpg|gif|mpg|psd|zip|rar|txt|mp3|wma|wmv) http://warmmx.com/404/404.gif [R,NC,L]
- </IfModule>
复制代码 warmmx.com是我的域名
两个问题一起发出来 希望得到各位高手的帮助,不胜感激! |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2009-12-3 10:03:54
|
显示全部楼层
回复 1# 的帖子
RewriteBase /
这里的“/" 修改为你程序所在目录
.htaccess放在你网站所在目录 |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2009-12-3 10:29:23
|
显示全部楼层
回复 2# 的帖子
|
防盗链你参考下:http://bbs.idcspy.com/thread-45349-1-1.html |
|
|
|
|
|
|
|
|