Recently want to try to experience the next Laravel framework, so you try to install the Laravel 5.4 environment under IIS 7, although encountered some problems, but eventually resolved, so the following article mainly introduces you to the installation of Laravel 5.4 Environment in IIS 7 method tutorial, You need a friend to refer to below.
Objective
This article mainly introduces to you about IIS 7 installs the Laravel 5.4 environment the related content, shares out for everybody to refer to the study, below comes together to look at the detailed introduction:
Site configuration is not detailed said, we can search online a lot of configuration method ah
Installation method
Direct:
Because IIS does not resemble the Apache.htaccess file, create a Web. config file under D:\www\clw_app\public
The Web. config configuration is as follows:
<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>
If you are an Apache environment, then the. htaccess in the public directory are:
<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>
I'm here to run the Drip IIS environment (let's not say Apache amount)
Iisreset/restart
In IIS, if the W3SVC service is not running, you can start with the following command:
net start w3svc
Final Run Effect:
summary