Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已答复] 求高手为我的ss做一个伪静态规则

[复制链接]
littlehz 发表于 2009-7-24 18:59:25 | 显示全部楼层
后面一段修改成
  1. RewriteRule ^/([a-z]+)\.xml$ /rss/?item=$1 [L]
  2. RewriteRule ^/(.+)-([0-9]+)\.html /index.php?action-model-name-$1-itemid-$2 [L]
  3. RewriteRule ^/search/(\d+)(?:/(\d+))?(?:/(?:index\.html?)?)?$ /search/member.php?uid=$1&page=$2 [L]
  4. RewriteRule ^/(jiaoyi|fangwu|zhaopin|huodong|fuwu|jiaoyou)(?:/(\w+))?(?:/(\w+)/([^/]+))?(?:/(\w+)/([^/]+))?(?:/(\w+)/([^/]+))?(?:/(\w+)/([^/]+))?(?:/(\w+)/([^/]+))?(?:/(?:index\.html?)?)?$ /m.php?name=$1&mo_catid=$2&$3=$4&$5=$6&$7=$8&$9=$10&$11=$12 [L]
复制代码

试试,目标 不需要转义
回复

使用道具 举报

 楼主| buhuien 发表于 2009-7-24 20:12:49 | 显示全部楼层
还是不行啊
回复

使用道具 举报

俊客 发表于 2009-7-24 22:32:40 | 显示全部楼层
请问RSS的rewrite如何写?
回复

使用道具 举报

jy198136 发表于 2009-7-24 23:12:04 | 显示全部楼层
本帖最后由 jy198136 于 2009-7-24 23:13 编辑

看不懂,没学过












-----------------------------------------
www.xuexiji.org
回复

使用道具 举报

littlehz 发表于 2009-7-25 09:40:16 | 显示全部楼层
本帖最后由 littlehz 于 2009-7-25 09:41 编辑

访问
http://www.anguo.cc/abc.xml
http://www.anguo.cc/fangwu

然后迅速查看服务器访问日志,看看这两个请求跳转到哪里了
你可以看看我写的这个 与SS有关的rewrite快速入门教程 https://discuz.dismall.com/thread-1361331-1-2.html
回复

使用道具 举报

 楼主| buhuien 发表于 2009-7-25 09:53:27 | 显示全部楼层
我是虚拟主机,从哪看服务器访问日志啊
回复

使用道具 举报

littlehz 发表于 2009-7-25 10:03:03 | 显示全部楼层
虚拟主机也会提供访问日志查看的,有些是FTP目录下有个logs文件夹,有些登录虚拟主机的控制面板有查看访问日志之类,问问空间提供商怎么看吧。
回复

使用道具 举报

 楼主| buhuien 发表于 2009-7-25 10:12:19 | 显示全部楼层
有两个,我摘了一下,这是第一个

[Sat Jul 25 09:59:40 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/abc.xml, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 09:59:42 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 10:09:05 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/abc.xml, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 10:09:07 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: https://discuz.dismall.com/thread-1361132-1-1.html



这是第二个

119.249.152.184 - - [25/Jul/2009:09:59:40 +0800] "GET /abc.xml HTTP/1.0" 404 1016 "https://discuz.dismall.com/thread-1361132-1-1.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
119.249.152.184 - - [25/Jul/2009:09:59:42 +0800] "GET /fangwu HTTP/1.0" 404 1016 "https://discuz.dismall.com/thread-1361132-1-1.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
119.249.152.184 - - [25/Jul/2009:10:09:05 +0800] "GET /abc.xml HTTP/1.0" 404 1016 "https://discuz.dismall.com/thread-1361132-1-1.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
119.249.152.184 - - [25/Jul/2009:10:09:07 +0800] "GET /fangwu HTTP/1.0" 404 1016 "https://discuz.dismall.com/thread-1361132-1-1.html" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
回复

使用道具 举报

 楼主| buhuien 发表于 2009-7-25 10:17:27 | 显示全部楼层
再发一次
使用日志122.195.159.214 - - [25/Jul/2009:10:12:01 +0800] "GET /batch.formhash.php?rand=564346 HTTP/1.0" 200 559 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:02 +0800] "GET /else/function.js HTTP/1.0" 200 2769 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:02 +0800] "GET /js/is.js HTTP/1.0" 200 962 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:02 +0800] "GET /else/show_info_count.php HTTP/1.0" 200 303 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:02 +0800] "GET /css/slide.js HTTP/1.0" 200 1222 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:10 +0800] "GET /fuwu/jianshen/ HTTP/1.0" 404 992 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:10 +0800] "GET /else/show_info_count.php HTTP/1.0" 200 303 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
122.195.159.214 - - [25/Jul/2009:10:12:14 +0800] "GET /else/show_info_count.php HTTP/1.0" 200 303 "http://www.anguo.cc/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; TheWorld)"
119.249.152.184 - - [25/Jul/2009:10:14:34 +0800] "GET /abc.xml HTTP/1.0" 404 954 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"
119.249.152.184 - - [25/Jul/2009:10:14:58 +0800] "GET /fangwu HTTP/1.0" 404 954 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"

错误日志

[Sat Jul 25 08:57:40 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/vip-3.html, referer: http://www.anguo.cc/
[Sat Jul 25 09:24:51 2009] [error] [client 122.157.198.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: http://bbs.admin5.com/thread-1140187-1-1.html
[Sat Jul 25 09:50:49 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: http://www.anguo.cc/
[Sat Jul 25 09:59:40 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/abc.xml, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 09:59:42 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 10:09:05 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/abc.xml, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 10:09:07 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu, referer: https://discuz.dismall.com/thread-1361132-1-1.html
[Sat Jul 25 10:12:10 2009] [error] [client 122.195.159.214] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fuwu, referer: http://www.anguo.cc/
[Sat Jul 25 10:14:34 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/abc.xml
[Sat Jul 25 10:14:58 2009] [error] [client 119.249.152.184] File does not exist: /home/buhuien/domains/anguo.cc/public_html/fangwu
回复

使用道具 举报

littlehz 发表于 2009-7-25 10:27:27 | 显示全部楼层
规则没有匹配上,试试这个
  1. RewriteRule ^/([a-z]+).xml$ /rss/?item=$1 [L]
复制代码


有些服务器处理转义,有些不处理。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-12 06:17 , Processed in 0.092984 second(s), 11 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表