本人装的amh,现在有个网站.htaccess是这么写的。<IfModule mod_rewrite.c>Options +FollowSymlinksRewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^word\/(.*)_(.*).html$ index.php/Home/Index/search?word=$1&page=$2 [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^word\/(.*).html$ index.php/Home/Index/search?word=$1 [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^read\/(.*).html$ index.php/Home/Index/read?hash=$1 [L]</IfModule>求nginx下该如何编写!
1 回答
桃花长相依
TA贡献1860条经验 获得超8个赞
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;
}
- 1 回答
- 0 关注
- 1047 浏览
添加回答
举报
0/150
提交
取消