去评论
dz插件网

谁能把Apache规则直接转换成Nginx规则

逝水年华
2026/04/25 10:42:37
<IfModule mod_rewrite.c>
    RewriteEngine On
    AddDefaultCharset UTF-8
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^search/(.*)$ /index.php?c=index&m=search&keywords=$1 [L,QSA]
    RewriteRule ^download.html$ /index.php?c=index&m=high_speed_download [L,QSA]
    RewriteRule ^info/([0-9]+).html$ /index.php?c=index&m=info_list&last_cate_id=$1 [L,QSA]
    RewriteRule ^game/([0-9]+).html$ /index.php?c=index&m=game_list&cate_id=$1 [L,QSA]
    RewriteRule ^soft/([0-9]+).html$ /index.php?c=index&m=soft_list&cate_id=$1 [L,QSA]
    RewriteRule ^necessary/([0-9]+).html$ /index.php?c=index&m=necessary_list&necessary_type=$1 [L,QSA]
    RewriteRule ^games/([0-9]+).html$ /index.php?c=index&m=game_more&cate_id=$1 [L,QSA]
    RewriteRule ^softs/([0-9]+).html$ /index.php?c=index&m=soft_more&cate_id=$1 [L,QSA]
    RewriteRule ^map.html$ /index.php?c=index&m=site_map [L,QSA]
    RewriteRule ^searchs.html$ /index.php?c=index&m=page_search [L,QSA]
    RewriteRule ^xcode.html$ /index.php?c=index&m=xcode [L,QSA]
    RewriteRule ^rank.html$ /index.php?c=index&m=list_rank [L,QSA]
    RewriteRule ^special.html$ /index.php?c=index&m=list_special [L,QSA]
    RewriteRule ^info.html$ /index.php?c=index&m=list_info [L,QSA]
    RewriteRule ^necessary.html$ /index.php?c=index&m=list_necessary [L,QSA]
    RewriteRule ^game.html$ /index.php?c=index&m=list_game [L,QSA]
    RewriteRule ^soft.html$ /index.php?c=index&m=list_soft [L,QSA]
    RewriteRule ^category/([0-9]+).html$ /index.php?c=index&m=list_category&cate_id=$1 [L,QSA]
    RewriteRule ^comment/([0-9]+).html$ /index.php?c=index&m=comment&app_id=$1 [L,QSA]
    RewriteRule ^qrcode/([0-9]+).html$ /index.php?c=index&m=qrcode&app_id=$1 [L,QSA]
    RewriteRule ^recommend/([0-9]+).html$ /index.php?c=index&m=list_recommend&id=$1 [L,QSA]
    RewriteRule ^download/([0-9]+).html$ /index.php?c=index&m=download&app_id=$1 [L,QSA]
    RewriteRule ^special/([0-9]+).html$ /index.php?c=index&m=content_special&special_id=$1 [L,QSA]
    RewriteRule ^news/([0-9]+).html$ /index.php?c=index&m=content_info&info_id=$1 [L,QSA]
    RewriteRule ^softs.html$ /index.php?c=index&m=more_soft [L,QSA]
    RewriteRule ^games.html$ /index.php?c=index&m=more_game [L,QSA]
    RewriteRule ^app/([0-9]+).html$ /index.php?c=index&m=content_app&app_id=$1 [L,QSA]
</IfModule>
谁能把上面的Apache规则直接转换成Nginx规则