Blogger Information
Blog 1
fans 0
comment 0
visits 847
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Windows II7 下laravel 项目新增路由都显示404
simple的博客
Original
852 people have browsed it

最近在IIS7服务器下安装了laravel ,安装完成后laravel可正常打开(网站根目录设置到public文件夹);但是我新建一条路由访问就会提示404(如:  Route::get('user/{id?}',function($id=20){return 'User'.$id;});   );

这是由于rewrite 伪静态设置的问题,安装laravel时 public文件夹下已存在配置好的web.config文件,文件不需要更改,你需要安装 IIS rewrite 组件,32位和64位系统下载对应的微软官方插件:

http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi

http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi

安装完成后重启IIS即可。


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!