nginx rewrite

# nginx rewrite rule

#Main menu rules.
rewrite ^(.*?)/index.html$ $1/index.php?r=site/index break;
rewrite ^(.*?)/bisai.html$ $1/index.php?r=site/bisaisong break;
rewrite ^(.*?)/yuanchang.html$ $1/index.php?r=site/yuanchang break;
rewrite ^(.*?)/search.html$ $1/index.php?r=site/search break;
rewrite ^(.*?)/starteams.html$ $1/index.php?r=site/starteams break;

#playlist rules.
rewrite ^(.*?)/yclist_([0-9]+).html$ $1/index.php?r=site/playlist&from=ychang&bsid=$2 break;
rewrite ^(.*?)/bslist_([0-9]+).html$ $1/index.php?r=site/playlist&from=bisai&bsid=$2 break;

#mplay rules.
#site/mplayer&boid=86&where=bisai
#site/mplayer&boid=20&where=yuanchang
rewrite ^(.*?)/ycmp_([0-9]+).html$ $1/index.php?r=site/mplayer&where=yuanchang&boid=$2 break;
rewrite ^(.*?)/bsmp_([0-9]+).html$ $1/index.php?r=site/mplayer&where=bisai&boid=$2 break;

#ajaxLoad rules.
rewrite ^(.*?)/ajaxload15BisaiSong$ $1/index.php?r=site/ajaxload15BisaiSong break;
rewrite ^(.*?)/ajaxload15YuancSong$ $1/index.php?r=site/ajaxload15YuancSong break;
rewrite ^(.*?)/ajaxload5jingxuanbisaiSong$ $1/index.php?r=site/ajaxload5jingxuanbisaiSong break;
rewrite ^(.*?)/ajaxload5jingxuanyuancSong$ $1/index.php?r=site/ajaxload5jingxuanyuancSong break;
rewrite ^(.*?)/gn_([0-9]+).html$ $1/index.php?r=site/getNumber&w=$2 break;
rewrite ^(.*?)/getPorderForBisai$ $1/index.php?r=site/getPorderForBisai break;
rewrite ^(.*?)/getPorderForYuanchang$ $1/index.php?r=site/getPorderForYuanchang break;
rewrite ^(.*?)/getPorderForHistorysg$ $1/index.php?r=site/getPorderForHistorysg break;

#Footer navi rules.
rewrite ^(.*?)/about.html$ $1/index.php?r=site/about break;
rewrite ^(.*?)/bisairule.html$ $1/index.php?r=site/bisairule break;
rewrite ^(.*?)/zhiscq.html$ $1/index.php?r=site/zhiscq break;
rewrite ^(.*?)/zhuzuoquan.html$ $1/index.php?r=site/zhuzuoquan break;
rewrite ^(.*?)/laysm.html$ $1/index.php?r=site/laysm break;
rewrite ^(.*?)/servicekuan.html$ $1/index.php?r=site/servicekuan break;
rewrite ^(.*?)/yinssm.html$ $1/index.php?r=site/yinssm break;
rewrite ^(.*?)/webmap.html$ $1/index.php?r=site/webmap break;
rewrite ^(.*?)/zhiscq.html$ $1/index.php?r=site/zhiscq break;
rewrite ^(.*?)/zhaopin.html$ $1/index.php?r=site/zhaopin break;
rewrite ^(.*?)/contact.html$ $1/index.php?r=site/contact break;
rewrite ^(.*?)/ylinks.html$ $1/index.php?r=site/ylinks break;

#login/register rules.
rewrite ^(.*?)/login.html$ $1/index.php?r=mber/index break;
rewrite ^(.*?)/register.html$ $1/index.php?r=mber/register break;

#other rules.
#http://192.168.0.122/songhua_24__1_19be2ecf93019d909a66c082818100d8.html
rewrite ^(.*?)/songhua_([0-9]+)_([0-9]+)_([0-9]+)_([A-Za-z0-9]+).html$ $1/index.php?r=site/giveFlower&id=$2&pid=$3&shuas=$4&sma=$5 break;
rewrite ^(.*?)/shoucuangMuc_([0-9]+)_([a-z]+)_([A-Za-z0-9]+).html$ $1/index.php?r=site/shoucuangmuc&id=$2&lx=$3&sma=$4 break;
rewrite ^(.*?)/blank.html$ $1/index.php?r=site/blank break;
rewrite ^(.*?)/hejis.html$ $1/index.php?r=site/hejis break;
rewrite ^(.*?)/platforms.html$ $1/index.php?r=site/platforms break;

#Mber in rules.
rewrite ^(.*?)/ajaxloadMberinfo_([0-2]+)_([0-9]+)_([A-Za-z0-9]+)$ $1/index.php?r=mber/ajaxloadMberbaseinfo&o=$2&mid=$3&authcode=$4 break;
rewrite ^(.*?)/ajaxloadMberauth_([0-1]+)_([0-9]+)_([A-Za-z0-9]+)$ $1/index.php?r=mber/ajaxloadMberauth&o=$2&mid=$3&authcode=$4 break;

#musicbox in rules.
rewrite ^(.*?)/mbox_(b|y)_([\|0-9]+).html$ $1/index.php?r=site/musicbox&from=$2&lists=$3 break;

#Word information in rules.
rewrite ^(.*?)/detail_([0-9]+).html$ $1/index.php?r=site/detail&ikey=$2 break;

#radio url in rules.
#rewrite ^(.*?)/playradio.html$ $1/index.php?r=site/radio break;

上一篇:asp.net安装指令


下一篇:AppCan开发者资料分享(定期更新)