tutorial on installing the Laravel 5.4 environment under IIS 7

Source: Internet
Author: User
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:

    • Laravel version: Laravel5.4

    • IIS version: IIS7

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.