php - .htaccess nginx报unexpecting end of file,expecting ";" or "}"

查看:111
本文介绍了php - .htaccess nginx报unexpecting end of file,expecting ";" or "}"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

RewriteEngine on  

RewriteCond $1 !^(index\.php|images|robots\.txt)
  
RewriteRule ^(.*)$ /index.php/$1 [L]

这是我的.htaccess,在nginx.conf中包含这个文件后,重启nginx报这个错误,求解答

解决方案

你这是 apache 的东西,放到 nginx 下肯定不能用的啊。

你可以用这个去转换下
http://www.anilcetin.com/convert-apache-htaccess-to-nginx/

这篇关于php - .htaccess nginx报unexpecting end of file,expecting ";" or "}"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆