windows服务器下iis8的伪静态转linux系统 后nginx伪静态前端显示404
A_鹏飞 2020-12-18 02:03:58
之前在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
这个问题怎么解决啊?百度了两天也不能解决,只好来这里求助了