提問三步曲: 提問先看教程/FAQ索引(wdcp,wdcp_v3,一鍵包)及搜索,會讓你更快解決問題
1 提供詳細,如系統(tǒng)版本,wdcp版本,軟件版本等及錯誤的詳細信息,貼上論壇或截圖發(fā)論壇
2 做過哪些操作或改動設置等
溫馨提示:信息不詳,很可能會沒人理你!論壇有教程說明的,也可能沒人理!因為,你懂的
[求助] 求個Nginx下的偽靜態(tài)規(guī)則
我把Apache htaccess 轉換Nginx 偽靜態(tài)規(guī)則后導致Nginx服務不能啟動
原規(guī)則:
- RewriteRule ^(.*)/uid-([a-z|0-9]+)\.html\?*(.*)$ $1/index\.php\?$2\.html
- RewriteRule ^(.*)index.html\?*(.*)$ $1/index\.php
- RewriteRule ^(.*)login.html\?*(.*)$ $1/login\.php
- RewriteRule ^(.*)reg.html\?*(.*)$ $1/reg\.php
- RewriteRule ^(.*)uid-([a-z|0-9]+)\.html\?*(.*)$ $1/index\.php\?$2\.html
- RewriteRule ^(.*)/([a-z]+)-([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/$2\.php\?$3-$4-$5\.html
- RewriteRule ^(.*)/([a-z]+)-([0-9]+)-([0-9]*)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/$2\.php\?$3-$4-$5-$6\.html
- RewriteRule ^(.*)news/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/news/show_news\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)notice/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/notice/show_notice\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)gl/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/gl/show_gl\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)game/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/game/show_game\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)company/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/company/show_company\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)cdkey/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/cdkey/show_cdkey\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)gamepic/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/gamepic/show_gamepic\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)media/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/media/show_media\.php\?$2-$3-$4\.html
- RewriteRule ^(.*)cdkey/([0-9]+)-([0-9]*)-([a-z|0-9]*)-([a-z|0-9]+)\.html\?*(.*)$ $1/cdkey/show_cdkey\.php\?$2-$3-$4-$5\.html
復制代碼
轉換后的規(guī)則:
- if ($rule_0 = ""){rewrite ^/(.*)/uid-([a-z|0-9]+).html?*(.*)$ /$1/index.php?$2.html;}
- if ($rule_1 = ""){rewrite ^/(.*)index.html?*(.*)$ /$1/index.php;}
- if ($rule_2 = ""){rewrite ^/(.*)login.html?*(.*)$ /$1/login.php;}
- if ($rule_3 = ""){rewrite ^/(.*)reg.html?*(.*)$ /$1/reg.php;}
- if ($rule_4 = ""){rewrite ^/(.*)uid-([a-z|0-9]+).html?*(.*)$ /$1/index.php?$2.html;}
- if ($rule_5 = ""){rewrite ^/(.*)/([a-z]+)-([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/$2.php?$3-$4-$5.html;}
- if ($rule_6 = ""){rewrite ^/(.*)/([a-z]+)-([0-9]+)-([0-9]*)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/$2.php?$3-$4-$5-$6.html;}
- if ($rule_7 = ""){rewrite ^/(.*)news/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/news/show_news.php?$2-$3-$4.html;}
- if ($rule_8 = ""){rewrite ^/(.*)notice/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/notice/show_notice.php?$2-$3-$4.html;}
- if ($rule_9 = ""){rewrite ^/(.*)gl/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/gl/show_gl.php?$2-$3-$4.html;}
- if ($rule_10 = ""){rewrite ^/(.*)game/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/game/show_game.php?$2-$3-$4.html;}
- if ($rule_11 = ""){rewrite ^/(.*)company/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/company/show_company.php?$2-$3-$4.html;}
- if ($rule_12 = ""){rewrite ^/(.*)cdkey/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/cdkey/show_cdkey.php?$2-$3-$4.html;}
- if ($rule_13 = ""){rewrite ^/(.*)gamepic/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/gamepic/show_gamepic.php?$2-$3-$4.html;}
- if ($rule_14 = ""){rewrite ^/(.*)media/([0-9]+)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/media/show_media.php?$2-$3-$4.html;}
- if ($rule_15 = ""){rewrite ^/(.*)cdkey/([0-9]+)-([0-9]*)-([a-z|0-9]*)-([a-z|0-9]+).html?*(.*)$ /$1/cdkey/show_cdkey.php?$2-$3-$4-$5.html;}
復制代碼
搞了半天也搞不明白希望有能力的朋友幫助一下謝謝 |