开发者社区> 问答> 正文

主机宝,有大神能帮忙改下伪静态规则吗?


我下了个思途cms,伪静态规则是Apache的,主机宝集成的是nginx,不知道怎么改规则,求大神帮忙!!

RewriteEngine On
RewriteBase /
# Rewrite 系统规则请勿修改


#子站跳转
RewriteCond %{HTTP_HOST} ^(.*\.)?52jscn.com$
RewriteCond %{HTTP_HOST} !^(demo\.)52jscn\.com$
RewriteRule ^(.*)$ sline/$1








#线路部分
RewriteRule ^lines/show_([0-9]+)+\.html$ lines/show.php?aid=$1
RewriteRule ^lines/print_([0-9]+)+\.html$ lines/print.php?aid=$1




RewriteRule ^lines/booking_([0-9]+)_([0-9]+)_([0-9]+)-([0-9]+)-([0-9]+)+\.html$ lines/booking.php?aid=$1&price=$2&date=$3-$4-$5
RewriteRule ^lines/booking.html$ lines/booking.php
#RewriteRule ^lines/([a-z]+)_([0-9]+)+\.html$ lines/gather.php?kname=$1&kid=$2




RewriteRule ^lines/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ lines/search.php?dest_id=$1&day=$2&priceid=$3&attrid=$4


RewriteRule ^lines/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ lines/search.php?dest_id=$1&day=$2&priceid=$3&attrid=$4&totalresult=$5&pageno=$6




RewriteRule ^lines/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ lines/search.php?dest_id=$1&day=$2&priceid=$3&attrid=$4&sorttype=$5


RewriteRule ^lines/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ lines/search.php?dest_id=$1&day=$2&priceid=$3&attrid=$4&sorttype=$5&totalresult=$6&pageno=$7






#酒店规则
RewriteRule ^hotels/show_([0-9]+)+\.html$ hotels/show.php?aid=$1




RewriteRule ^hotels/([a-z]+)_([0-9]+)+\.html$ hotels/gather.php?kid=$2




RewriteRule ^hotels/booking.html$  hotels/booking.php


RewriteRule ^hotels/search_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ hotels/search.php?priceid=$1&rankid=$2&locationid=$3


RewriteRule ^hotels/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ hotels/search.php?dest_id=$1&rankid=$2&priceid=$3&totalresult=$4&pageno=$5






#车务


RewriteRule ^cars/show_([0-9]+)+\.html$ cars/show.php?aid=$1








RewriteRule ^cars/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ cars/search.php?dest_id=$1&carkindid=$2&brandid=$3&priceid=$4


RewriteRule ^cars/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ cars/search.php?dest_id=$1&carkindid=$2&brandid=$3&priceid=$4&totalresult=$5&pageno=$6




#问答
RewriteRule ^questions/show_([0-9]+)+\.html$ questions/show.php?aid=$1
RewriteRule ^questions/list_([0-9]+)+\.html$ questions/list.php?tid=$1
RewriteRule ^questions/list_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ questions/list.php?tid=$1&totalresult=$2&pageno=$3




#帮助
RewriteRule ^help/index_([0-9]+)+\.html$ help/index.php?aid=$1
RewriteRule ^help/show_([0-9]+)+\.html$ help/show.php?aid=$1




#副导航
RewriteRule ^servers/index_([0-9]+)+\.html$ servers/index.php?aid=$1
RewriteRule ^servers/yqlj+\.html$ servers/yqlj.php
RewriteRule ^servers/sitemap+\.html$ servers/sitemap.php


RewriteRule ^raiders/show_([0-9]+)+\.html$ raiders/show.php?aid=$1
RewriteRule ^raiders/brief_([0-9]+)_([0-9]+)+\.html$ raiders/brief.php?aid=$1&webid=$2
RewriteRule ^raiders/([a-z]+)_([0-9]+)+\.html$ raiders/gather.php?kid=$2


RewriteRule ^raiders/search_([0-9]+)_([0-9]+)+\.html$ raiders/search.php?dest_id=$1&attrid=$2


RewriteRule ^raiders/arctag_([0-9]+)_([0-9]+)\.html$ raiders/arctag.php?tag=$1&listid=$2


RewriteRule ^raiders/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ raiders/search.php?childid=$1&attrid=$2&totalresult=$3&pageno=$4




#相册
RewriteRule ^photos/show_([0-9]+)_([0-9]+)+\.html$ photos/show.php?id=$1&imgid=$2
RewriteRule ^photos/show_([0-9]+)\.html$ photos/show.php?id=$1




RewriteRule ^photos/search_([0-9]+)_([0-9]+)+\.html$ photos/index.php?dest_id=$1&attrid=$2


RewriteRule ^photos/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ photos/index.php?dest_id=$1&attrid=$2&totalresult=$3&pageno=$4








RewriteRule ^spots/show_([0-9]+)+\.html$ spots/show.php?aid=$1


RewriteRule ^spots/brief_([0-9]+)_([0-9]+)+\.html$ spots/brief.php?aid=$1&webid=$2


RewriteRule ^spots/([a-z]+)_([0-9]+)+\.html$ spots/gather.php?kname=$1&kid=$2




RewriteRule ^spots/search_([0-9]+)_([0-9]+)+\.html$ spots/search.php?dest_id=$1&spottypeid=$2


RewriteRule ^spots/search_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)+\.html$ spots/search.php?dest_id=$1&spottypeid=$2&totalresult=$3&pageno=$4




RewriteCond $1 !^(stourtravel|visa|cars|lines|spots|raiders|servers|uploads|photos|hotels|questions|destination|min|sline|member|tuan|customize|install|zhuanti)
RewriteRule ^([0-9a-z]+)(/)?$ destination/main.php?destid=$1
RewriteCond $1 !^(sline|min)
RewriteRule ^([0-9a-z]+)/(lines|hotels|cars|spots|raiders|photos)(/)?$ destination/gather.php?destid=$1&type=$2




#团购
RewriteRule ^tuan/show_([0-9]+)+\.html$ tuan/show.php?aid=$1
RewriteRule ^tuan/book_([0-9]+)+\.html$ tuan/book.php?tuanaid=$1




RewriteRule ^cloudsearch_(.*)_([0-9]+)_([0-9]+)+\.html$ cloudsearch.php?keyword=$1&typeid=$2&pageno=$3


RewriteRule ^visa/show_([0-9]+)+\.html$ visa/show.php?aid=$1
RewriteRule ^visa/country+\.html$ visa/country.php
RewriteRule ^visa/([0-9]+)+\.html$ visa/fenlei.php?nationid=$1
RewriteRule ^visa/booking_([0-9]+)+\.html$ visa/booking.php?aid=$1




#ErrorDocument 404 /404.php


RewriteRule ^zhuanti/([0-9]+)\.html$  zhuanti/?tid=$1








RewriteRule ^lines/([a-z0-9]+)(/)?$ lines/search.php?dest_id=$1


RewriteRule ^lines/([a-z0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)?$ lines/search.php?dest_id=$1&day=$2&priceid=$3&sorttype=$4&keyword=$5&attrid=$6


RewriteRule ^lines/([a-z0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)-([0-9]+)?$ lines/search.php?dest_id=$1&day=$2&priceid=$3&sorttype=$4&keyword=$5&attrid=$6&pageno=$7#酒店搜索


RewriteRule ^hotels/([a-z0-9]+)(/)?$ hotels/search.php?dest_id=$1


RewriteRule ^hotels/([a-z0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)?$ hotels/search.php?dest_id=$1&rankid=$2&priceid=$3&sorttype=$4&keyword=$5&attrid=$6


RewriteRule ^hotels/([a-z0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)-([0-9]+)?$ hotels/search.php?dest_id=$1&rankid=$2&priceid=$3&sorttype=$4&keyword=$5&attrid=$6&pageno=$7


#相册
RewriteRule ^photos/([a-z0-9]+)-([0-9_]+)$ photos/index.php?dest_id=$1&attrid=$2
RewriteRule ^photos/([a-z0-9]+)-([0-9_]+)-([0-9]+)$ photos/index.php?dest_id=$1&attrid=$2&pageno=$3
RewriteRule ^photos/([a-z0-9]+)(/)?$ photos/index.php?dest_id=$1


#团购
RewriteRule ^tuan/([a-z0-9]+)-([0-9_]+)$ tuan/index.php?dest_id=$1&attrid=$2
RewriteRule ^tuan/([a-z0-9]+)-([0-9_]+)-([0-9]+)$ tuan/index.php?dest_id=$1&attrid=$2&pageno=$3
RewriteRule ^tuan/([a-z0-9]+)(/)?$ tuan/index.php?dest_id=$1


#景点搜索


RewriteRule ^spots/([a-z0-9]+)(/)?$ spots/search.php?dest_id=$1


RewriteRule ^spots/([a-z0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)?$ spots/search.php?dest_id=$1&priceid=$2&sorttype=$3&keyword=$4&attrid=$5


RewriteRule ^spots/([a-z0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9_]+)-([0-9]+)?$ spots/search.php?dest_id=$1&priceid=$2&sorttype=$3&keyword=$4&attrid=$5&pageno=$6


#租车


RewriteRule ^cars/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9_]+)-([0-9a-z]+)-([0-9_]+)$ cars/search.php?startplaceid=$1&carkindid=$2&brandid=$3&priceid=$4&seatnum=$5&displayorder=$6&attrid=$7


RewriteRule ^cars/([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9_]+)-([0-9a-z]+)-([0-9_]+)-([0-9]+)$ cars/search.php?startplaceid=$1&carkindid=$2&brandid=$3&priceid=$4&seatnum=$5&displayorder=$6&attrid=$7&pageno=$8


#攻略
RewriteRule ^raiders/([a-z0-9]+)-([0-9_]+)$ raiders/search.php?dest_id=$1&attrid=$2
RewriteRule ^raiders/([a-z0-9]+)-([0-9_]+)-([0-9]+)$ raiders/search.php?dest_id=$1&attrid=$2&pageno=$3
RewriteRule ^raiders/([a-z0-9]+)(/)?$ raiders/search.php?dest_id=$1


#签证
RewriteRule ^visa/([0-9]+)-([0-9_]+)-([0-9]+)-0$ visa/search.php?countryid=$1&cityid=$2&visatypeid=$3
RewriteRule ^visa/([0-9]+)-([0-9_]+)-([0-9]+)-0-([0-9]+)$ visa/search.php?countryid=$1&cityid=$2&visatypeid=$3&pageno=$4
RewriteRule ^lines/([a-z0-9]+)-0-0-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9]+)-([0-9_]+)?$ lines/search.php?dest_id=$1&day=$2&priceid=$3&sorttype=$4&keyword=$5&startcity=$6&attrid=$7


RewriteRule ^lines/([a-z0-9]+)-0-0-([0-9]+)-([0-9]+)-([0-9]+)-([^-]+)-([0-9]+)-([0-9_]+)-([0-9]+)?$ lines/search.php?dest_id=$1&day=$2&priceid=$3&sorttype=$4&keyword=$5&startcity=$6&attrid=$7&pageno=$8

展开
收起
bloodhell 2015-03-27 16:29:18 10587 0
1 条回答
写回答
取消 提交回答
  • 您好可以尝试使用
    http://www.anilcetin.com/convert-apache-htaccess-to-nginx/

    在线转换
    2015-03-31 14:21:23
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载