AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] Rewrite没起作用,访问空白 |
|
---|---|
sonyecc |
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分)
2013-10-29 10:56:34 1
|
sonyecc |
以下是我在线转换后的
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; }
回复
2013-10-29 10:56:53 2
|
sonyecc |
支持访问一片空白
回复
2013-10-29 10:57:57 3
|
collapsarzhang |
转换的一般都不行的,还得自己研究Nginx的规则语法。
回复
2013-10-29 12:48:10 4
|
tanyuxiang |
。。。。。这么复杂
回复
2013-10-29 14:29:24 5
|
Yusky |
研究下nginx的规则把。 转换的不行 支持
回复
2013-10-29 17:27:00 6
|
collapsarzhang |
回复
2013-10-30 04:21:48 7
|
Yusky |
回复
2013-10-30 10:11:24 8
|