- Copy the
web.config
insidepublic
directory of your Laravel project - You have to use rewrite plugin https://www.iis.net/downloads/microsoft/url-rewrite
Last active
June 19, 2024 22:09
-
-
Save abenevaut/13c8bcee7aca59cb7930ac6b94545e4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<defaultDocument> | |
<files> | |
<add value="index.php" /> | |
</files> | |
</defaultDocument> | |
<rewrite> | |
<rules> | |
<rule name="Laravel rewrite" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="index.php/{R:1}" /> | |
</rule> | |
</rules> | |
</rewrite> | |
<staticContent> | |
<remove fileExtension=".woff" /> | |
<mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | |
<remove fileExtension=".woff2" /> | |
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /> | |
</staticContent> | |
</system.webServer> | |
</configuration> |
Windows 11:
Enable-WindowsOptionalFeature -Online -FeatureName <service-name>
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer, IIS-CommonHttpFeatures, IIS-ManagementConsole, IIS-HttpErrors, IIS-HttpRedirect, IIS-WindowsAuthentication, IIS-StaticContent, IIS-DefaultDocument, IIS-HttpCompressionStatic, IIS-DirectoryBrowsing, IIS-CGI
Disable IIS service
Disable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole, IIS-WebServer
hosts
file path on windows: C:\Windows\System32\drivers\etc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.iis.net/downloads/microsoft/url-rewrite