这份规则如何写成 nginx 规则

2015-03-22 03:54:54 +08:00
 fantasts

index.php?xiami={id}
index.php?xiamiplayer={id}
index.php?m163={id}
index.php?m163player={id}
index.php?ttpod={songname}
index.php?ttpodplayer={songname}
index.php?kugou={songname}
index.php?kugouplayer={songname}

.htaccess下是这么写的
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^xiami/(\d)[\/][.mp3]$ index.php?xiami=$1 [NC]
RewriteRule ^xiamiplayer/(\d
)[\/][.mp3]$ index.php?xiamiplayer=$1 [NC]
RewriteRule ^m163/(\d)[\/][.mp3]$ index.php?m163=$1 [NC]
RewriteRule ^m163player/(\d
)[\/][.mp3]$ index.php?m163player=$1 [NC]
RewriteRule ^ttpod/(.+?)[\/][.mp3]$ index.php?ttpod=$1 [NC]
RewriteRule ^ttpodplayer/(.+?)[\/][.mp3]$ index.php?ttpodplayer=$1 [NC]
RewriteRule ^kugou/(.+?)[\/][.mp3]$ index.php?kugou=$1 [NC]
RewriteRule ^kugouplayer/(.+?)[\/][.mp3]$ index.php?kugouplayer=$1 [NC]
</IfModule>

如何写成nginx 的规则呢

1958 次点击
所在节点    问与答
2 条回复
Septembers
2015-03-22 06:27:46 +08:00
fantasts
2015-03-23 12:31:32 +08:00
@Septembers 转换出来是没用

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/178550

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX