国家儿童医学中心(上海) | 上海交通大学医学院附属上海儿童医学中心 | 心脏中心 官方知识平台

.htaccess文件配置改动

陆医生
📅 2012-08-06 · 👁 2 次浏览 · 💬 1 条回复
原文件代码为
# 将 RewriteEngine 模式打开
RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /

# Rewrite 系统规则请勿修改
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 ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1


RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://new.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com$      
RewriteRule .*\.(jpg|jpeg|gif|bmp|flv|rar|png)$ http://data.ibabyheart.com/no.bmp [R,NC]

RewriteCond %{HTTP_HOST} ^bbs.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.bbs.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/forum\.php" 

RewriteCond %{HTTP_HOST} ^home.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.home.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/home\.php" 

RewriteCond %{HTTP_HOST} ^new.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.new.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com" 

修改后变为
# 将 RewriteEngine 模式打开
RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /

# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$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 ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$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 ^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]+)-(.+)\.html$ $1.php?rewrite=$2&%1


RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://new.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com$      
RewriteRule .*\.(jpg|jpeg|gif|bmp|flv|rar|png)$ http://data.ibabyheart.com/no.bmp [R,NC]

RewriteCond %{HTTP_HOST} ^bbs.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.bbs.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/forum\.php" 

RewriteCond %{HTTP_HOST} ^home.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.home.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/home\.php" 

RewriteCond %{HTTP_HOST} ^new.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.new.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com" 

全部回复 (1)

陆医生 会员
📅 2012-08-06
原文件代码为
# 将 RewriteEngine 模式打开
RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /

# Rewrite 系统规则请勿修改
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 ^([a-z]+)-(.+)\.html$ $1.php?rewrite=$2&%1


RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://new.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com$      
RewriteRule .*\.(jpg|jpeg|gif|bmp|flv|rar|png)$ http://data.ibabyheart.com/no.bmp [R,NC]

RewriteCond %{HTTP_HOST} ^bbs.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.bbs.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/forum\.php" 

RewriteCond %{HTTP_HOST} ^home.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.home.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/home\.php" 

RewriteCond %{HTTP_HOST} ^new.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.new.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com" 

修改后变为
# 将 RewriteEngine 模式打开
RewriteEngine On

# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /

# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$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 ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$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 ^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]+)-(.+)\.html$ $1.php?rewrite=$2&%1


RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://new.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.babyheart.com.cn$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://bbs.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://data.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://gfshgf.usa3.22953.com$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://home.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://lumanyi.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.com$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.ibabyheart.org$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com/.*$      
RewriteCond %{HTTP_REFERER} !^http://www.lumanyi.com$      
RewriteRule .*\.(jpg|jpeg|gif|bmp|flv|rar|png)$ http://data.ibabyheart.com/no.bmp [R,NC]

RewriteCond %{HTTP_HOST} ^bbs.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.bbs.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/forum\.php" 

RewriteCond %{HTTP_HOST} ^home.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.home.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com\/home\.php" 

RewriteCond %{HTTP_HOST} ^new.ibabyheart.com$ 
RewriteCond %{HTTP_HOST} ^www.new.ibabyheart.com$
RewriteRule ^/?$ "http\:\/\/www\.ibabyheart\.com" 

陆医生 会员
📅 2012-08-06
修改后18~21行为新增项目,这样就解决日志静态化失败的问题了。

✏️ 写回复

登录后即可回复

👤 用户信息

加载中…