例如你的原路径是 http://localhost/test/index.php/index/add
那么现在的地址是 http://localhost/test/index/add
如何去掉index.php呢?
1、httpd.conf配置文件中加载了mod_rewrite.so模块 //在apache里面去配置
2、allowoverride none 讲none改为 all //在apache里面去配置 (注意其他地方的allowoverride也统统设置为all)
3、确保url_model设置为2,在项目的配置文件里写
4 、.htaccess文件必须放到跟目录下
这个文件里面加:
如对本文有疑问, 点击进行留言回复!!
thinkphp5 + ajax 使用formdata提交数据(包括文件上传) 后台返回json完整实例
使用Entrust扩展包在laravel 中实现RBAC的功能
网友评论