为了账号安全,请及时绑定邮箱和手机立即绑定

nginx伪静态编写?

/ 猿问

nginx伪静态编写?

收到一只叮咚 2018-11-21 23:19:28

本人装的amh,现在有个网站.htaccess是这么写的。
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^word\/(.*)_(.*).html$ index.php/Home/Index/search?word=$1&page=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^word\/(.*).html$ index.php/Home/Index/search?word=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^read\/(.*).html$ index.php/Home/Index/read?hash=$1 [L]

</IfModule>
求nginx下该如何编写!

查看完整描述

1 回答

?
桃花长相依

if (!-f $request_filename) {
rewrite ^/word\/(.*)_(.*).html$ index.php/Home/Index/search?word=$1&page=$2 last;
}
if (!-f $request_filename) {
rewrite ^/word\/(.*).html$ index.php/Home/Index/search?word=$1 last;
}
if (!-f $request_filename) {
rewrite ^/read\/(.*).html$ index.php/Home/Index/read?hash=$1 last;
}

查看完整回答
反对 回复 2018-12-13
  • 1 回答
  • 0 关注
  • 675 浏览
我要回答

添加回答

回复

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信