phplaraveliisiis-8

IIS Internet Information Services url rewrite module 2 . if i download and install url rewrite module it will affects other working sites also?


i am working on IIS server and deployed Laravel project in IIS server by creating new site added public folder (of Laravel project) as physical directory .I had errors like

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

and i had this.so errors I downloaded url rewrite and installed and its working .Now what's my point is if i download and run means its will affects current running sits also? Eg; i am running 5 sties in IIS and 6 th site had error i download and run it will affect's exiting site also ?. or direct change the web.config ?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpProtocol>
            <customHeaders>
                <add name="Access-Control-Allow-Headers" value="Origin, Content-Type, Authorization,X-Requested-With" />
                <add name="Access-Control-Allow-Methods" value="GET" />
                <add name="X-Download-Options" value="noopen" />
                <add name="X-Frame-Options" value="DENY" />
                <!-- if you need to allow same origin, comment above line and uncomment below line -->
                <!-- <add name="X-Frame-Options" value="SAMEORIGIN" /> -->
                <add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" />
                <add name="X-XSS-Protection" value="1; mode=block" />
                <add name="X-Content-Type-Options" value="nosniff" />
                <add name="Referrer-Policy" value="origin-when-cross-origin" />
                <remove name="X-Powered-By" />
            </customHeaders>
        </httpProtocol>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_AUTHORIZATION}" ignoreCase="false" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{URL}" pattern="(.+)/$" ignoreCase="false" />
                    </conditions>
                    <action type="Redirect" url="{C:1}" redirectType="Permanent" />
                </rule>
                <rule name="Imported Rule 2" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <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>
        <staticContent>
        </staticContent>
        <security>
            <requestFiltering>
                <requestLimits maxQueryString="5000" />
                <verbs applyToWebDAV="false">
                    <add verb="TRACE" allowed="false" />
                </verbs>
            </requestFiltering>
        </security>
        <directoryBrowse enabled="false" showFlags="Date, Time, Size, Extension, LongDate" />
    </system.webServer>
</configuration>

just simple if i download and run rewrite url .does it will affect exiting site ?.or any change need in web.config ?


Solution

  • According to your description, I know that you have a site configured with rewrite rules in web.config. But you have not installed the URL Rewrite module, the part is not understood, so you get a 500.19 error when you visit the site.

    The best solution is to install the URL rewriting module. The URL Rewrite module allows you to define rules at the site level, this should not directly affect other sites hosted on the same IIS server, as each site is configured independently with its own separate web.config file.

    So installing the URL rewrite module doesn't affect existing sites and you don't need to make changes in web.config either.