之前在windows服務器下iis8的偽靜態寫法,為什么現在換成了linux系統,nginx偽靜態前端顯示404
這個是iis8的偽靜態
<rule name="fenlei">
<match url="^([_-~\w]+)/$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/category.php?catid={R:1}" appendQueryString="false" />
</rule>
結果:http://www.xxx.com/xxxx/ 可以訪問目標頁面
linux 系統 nginx偽靜態 前端顯示404
location / {
rewrite "^([^\.]*)/([_-~\w])/\$" $1/category.php?catid=$2 last;
}
結果:http://www.xxx.com/xxxx/ 訪問目標頁面404
這個問題怎么解決啊?百度了兩天也不能解決,只好來這里求助了
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/237026.html
標籤:Apache
