前言
本文主要给大家介绍了关于iis 7下安装laravel 5.4环境的相关内容,分享出来供大家参考学习,下面来一起看看详细的介绍:
- laravel版本: laravel5.4
- iis版本:iis7
站点配置就不详细说啦,大家网上可以搜一坨很多的配置方法啦哈
安装方法
直接上图:
由于iis没有像apache.htaccess文件,创建一个web.config文件在 d:\\www\\clw_app\\public 下面
web.config配置如下:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 |
<configuration>
<system.webserver>
<rewrite>
<rules>
<rule name= "imported rule 1" stopprocessing= "true" >
<match url= "^(.*)/$" ignorecase= "false" />
<conditions>
<add input= "{request_filename}" matchtype= "isdirectory" ignorecase= "false" negate= "true" />
</conditions>
<action type= "redirect" redirecttype= "permanent" url= "/{r:1}" />
</rule>
<rule name= "imported rule 2" stopprocessing= "true" >
<match url= "^" ignorecase= "false" />
<conditions>
<add input= "{request_filename}" matchtype= "isdirectory" ignorecase= "false" negate= "true" />
<add input= "{request_filename}" matchtype= "isfile" ignorecase= "false" negate= "true" />
</conditions>
<action type= "rewrite" url= "index.php" />
</rule>
</rules>
</rewrite>
</system.webserver>
</configuration> |
大家如果是apache环境,那么public目录下的.htaccess是:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 |
<ifmodule mod_rewrite.c>
<ifmodule mod_negotiation.c>
options -multiviews
</ifmodule>
rewriteengine on
# redirect trailing slashes if not a folder...
rewritecond %{request_filename} !-d
rewriterule ^(.*)/$ / $1 [l,r=301]
# handle front controller...
rewritecond %{request_filename} !-d
rewritecond %{request_filename} !-f
rewriterule ^ index.php [l]
# handle authorization header
rewritecond %{http:authorization} .
rewriterule .* - [e=http_authorization:%{http:authorization}]
</ifmodule> |
我这里是运行滴iis环境(暂且咱不说apache额)
?
1 |
iisreset /restart |
在iis中如果w3svc服务没有运行,可以开始用下面的命令:
?
1 |
net start w3svc |
最终运行效果:
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如有疑问大家可以留言交流,谢谢大家对快网idc的支持。
原文链接:http://www.cnblogs.com/phpper/p/6849305.html
相关文章
猜你喜欢
- 个人服务器网站搭建:如何选择适合自己的建站程序或框架? 2025-06-10
- 64M VPS建站:能否支持高流量网站运行? 2025-06-10
- 64M VPS建站:怎样选择合适的域名和SSL证书? 2025-06-10
- 64M VPS建站:怎样优化以提高网站加载速度? 2025-06-10
- 64M VPS建站:是否适合初学者操作和管理? 2025-06-10
TA的动态
- 2025-07-10 怎样使用阿里云的安全工具进行服务器漏洞扫描和修复?
- 2025-07-10 怎样使用命令行工具优化Linux云服务器的Ping性能?
- 2025-07-10 怎样使用Xshell连接华为云服务器,实现高效远程管理?
- 2025-07-10 怎样利用云服务器D盘搭建稳定、高效的网站托管环境?
- 2025-07-10 怎样使用阿里云的安全组功能来增强服务器防火墙的安全性?
快网idc优惠网
QQ交流群
您的支持,是我们最大的动力!
热门文章
-
hiberfil.sys可以删除吗?win10系统中hiberfil.sys文件删除方法
2025-05-27 82 -
2025-05-25 92
-
2025-05-29 101
-
2025-05-29 98
-
2025-05-25 49
热门评论