产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] Rewrite没起作用,访问空白

sonyecc
铁牌会员
30.00 价值分

sonyecc 发表于 2013-10-29 10:56:34
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.82
RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
RewriteBase /
RewriteCond %{HTTP_HOST} ^manhuafu.com$ [NC]
RewriteRule ^(.*)$ http://www.manhuafu.com/$1 [L,R=301]
#desktopurl
RewriteRule ^desktop$ /desktop.php [L]
#guestcomic
RewriteRule ^gb-show.html$ /index.php\?s=/Home-gb-show-p-1 [L]
RewriteRule ^gb-show-p-(.*).html$ /index.php\?s=/Home-gb-show-p-$1 [L]
#RewriteRule ^comics(.*)$ /ppp.php\?url=$1 [L]
#rank
RewriteRule ^rank(\/|\/(index|week|month|total))?$ index.php\?s=/Home-rank-today-id-$2 [L]
#new
RewriteRule ^latest(\/|\/(index|day15|day30))?$ index.php\?s=/Home-latest-day-id-$2 [L]
#plus_search
RewriteRule ^plus-search-vod?(.*)$ /index.php\?s=plus-search-vod-$1 [NU,L]
#Gold
RewriteRule ^handler/vote\?act=get&bid=([0-9]+)$ /index.php\?s=Gold-vod-type-0-id-$1 [L]
RewriteRule ^handler/vote\?act=vote&bid=([0-9]+)&s=([0-9])$ /index.php\?s=Gold-vod-type-1-id-$1-s-$2 [L]
#error
RewriteRule ^handler/error/(.*)$ /index.php\?s=Gb-insert-$1 [L]
#search
RewriteRule ^search/q_(.*)$ /index.php\?s=/Home-vod-search-wd-$1 [NU,L]
RewriteRule ^search/q_(.*)_p(.*)$ /index.php\?s=/Home-vod-search-wd-$1-p$2 [NU,L]
#neirong
#RewriteRule ^(.*)\/([0-9]+)/$ /index.php\?s=/Home-vod-read-pdir-$1-id-$2 [L]

RewriteRule ^(random)\/(.*)$ /index.php\?s=/Home-vod-random [L]
#play
RewriteRule ^([a-zA-Z]+)/([0-9]+)/([0-9])([0-9]+).html$ /index.php\?s=/Home-vod-play-pdir-$1-id-$2-sid-$3-pid-$4 [L]
RewriteRule ^([a-zA-Z]+)/([0-9]+)/([0-9])([0-9]+).html(.*)$ /index.php\?s=/Home-vod-play-pdir-$1-id-$2-sid-$3-pid-$4-p-$5 [L]
#my_xx
#RewriteRule ^([a-zA-Z]+).html$ /index.php\?s=/Home-my-$1 [L]

#vod_list
RewriteRule ^(comic)\/$ /index.php\?s=/Home-vod-show-pdir-$1 [L]
RewriteRule ^(comic)\/p-([0-9]+)$ /index.php\?s=/Home-vod-show-pdir-$1-p-$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(comic)\/(.*)$ /index.php\?s=/Home-vod-show-pdir-$1-$2 [NU,L]
#[area] => [language] => [year] => 0 [actor] => [director] => [wd] => [smid] => 0 [page] => 1 [letter] => [lz] => 0 [order] => id [title] => [skin] => pp_vodlist

#日本-2013-1-A-1-id
#日本-2013-1-A-1-id-p2
#RewriteRule ^(comic)\/(.*)-(.*)-(.*)-(.*)-(.*)-(.*)$ /index.php\?s=/Home-vod-show-pdir-$1-area-$2-year-$3-smid-$4-letter-$5-lz-$6-order-$7 [NU,L]
#RewriteRule ^(comic)\/(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-p([0-9]+)$ /index.php\?s=/Home-vod-show-pdir-$1-area-$2-year-$3-smid-$4-letter-$5-lz-$6-order-$7-p-$8 [NU,L]

#模板防盗
RewriteRule ^tpl/(.*)/home/(.*).html$ /index.html








以上是原始的.htaccess
评价: 这个问题有价值吗?  没有 (0分)   有, 感谢 (0分)
2013-10-29 10:56:34 1

sonyecc
铁牌会员
30.00 价值分

以下是我在线转换后的


location / {
if ($http_host ~* "^manhuafu.com$"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite ^/(.*)$ http://www.manhuafu.com/$1 permanent;
}
rewrite ^/desktop$ /desktop.php last;
rewrite ^/gb-show.html$ /index.php?s=/Home-gb-show-p-1 last;
rewrite ^/gb-show-p-(.*).html$ /index.php?s=/Home-gb-show-p-$1 last;
rewrite ^/rank(/|/(index|week|month|total))?$ /index.php?s=/Home-rank-today-id-$2 last;
rewrite ^/latest(/|/(index|day15|day30))?$ /index.php?s=/Home-latest-day-id-$2 last;
rewrite ^/plus-search-vod?(.*)$ /index.php?s=plus-search-vod-$1 last;
rewrite ^/handler/vote?act=get&bid=([0-9]+)$ /index.php?s=Gold-vod-type-0-id-$1 last;
rewrite ^/handler/vote?act=vote&bid=([0-9]+)&s=([0-9])$ /index.php?s=Gold-vod-type-1-id-$1-s-$2 last;
rewrite ^/handler/error/(.*)$ /index.php?s=Gb-insert-$1 last;
rewrite ^/search/q_(.*)$ /index.php?s=/Home-vod-search-wd-$1 last;
rewrite ^/search/q_(.*)_p(.*)$ /index.php?s=/Home-vod-search-wd-$1-p$2 last;
rewrite ^/(random)/(.*)$ /index.php?s=/Home-vod-random last;
rewrite ^/([a-zA-Z]+)/([0-9]+)/([0-9])([0-9]+).html$ /index.php?s=/Home-vod-play-pdir-$1-id-$2-sid-$3-pid-$4 last;
rewrite ^/([a-zA-Z]+)/([0-9]+)/([0-9])([0-9]+).html(.*)$ /index.php?s=/Home-vod-play-pdir-$1-id-$2-sid-$3-pid-$4-p-$5 last;
rewrite ^/(comic)/$ /index.php?s=/Home-vod-show-pdir-$1 last;
rewrite ^/(comic)/p-([0-9]+)$ /index.php?s=/Home-vod-show-pdir-$1-p-$2 last;
if (!-f $request_filename){
set $rule_17 1$rule_17;
}
if (!-d $request_filename){
set $rule_17 2$rule_17;
}
if ($rule_17 = "21"){
rewrite ^/(comic)/(.*)$ /index.php?s=/Home-vod-show-pdir-$1-$2 last;
}
rewrite ^/tpl/(.*)/home/(.*).html$ /index.html;
}
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-29 10:56:53 2

sonyecc
铁牌会员
30.00 价值分

支持访问一片空白
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-29 10:57:57 3

collapsarzhang
铁牌会员
185.00 价值分

转换的一般都不行的,还得自己研究Nginx的规则语法。
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-29 12:48:10 4

tanyuxiang
金牌会员
5420.37 价值分

。。。。。这么复杂
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-29 14:29:24 5

Yusky
金牌会员
11307.70 价值分

研究下nginx的规则把。 转换的不行 支持
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-29 17:27:00 6

collapsarzhang
铁牌会员
185.00 价值分

引用:
Yusky 发表于 2013-10-29 17:27
研究下nginx的规则把。 转换的不行


对了,你这个头像叫什么系列?
之前想找来着忘了叫什么...
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-30 04:21:48 7

Yusky
金牌会员
11307.70 价值分

引用:
collapsarzhang 发表于 2013-10-30 04:21
对了,你这个头像叫什么系列?
之前想找来着忘了叫什么...


支持在国外的网站自己勾的
评价: 这个答复有价值吗?  没有 (0分)   有, 感谢 (0分)
回复  2013-10-30 10:11:24 8
 1  (总1页)
AMH社区列表
用户服务中心