[How To]Web Server Start and basic Services

05/16/2022 10:25 pardilias#16
Quote:
Originally Posted by beetols View Post
IIS have a configuration file in root (predefinted folder: wwwroot) called web.config
if you open it will see a begin side
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
And end with

Code:
    </system.webServer>
</configuration>
inside there are some others impostations like

Code:
<defaultDocument>
    ...
</defaultDocument>
at same level than this we can add our script side for remove the extension:

Code:
        <rewrite>
            <rules>
                <rule name="rewritephp">
                           <match url="(.*)" />
                           <conditions logicalGrouping="MatchAll">
                             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                           </conditions>
                           <action type="Rewrite" url="{R:1}.php" />
                </rule>     
            </rules>
        </rewrite>
At this point you can remove the extension '.php' or '.html' in the urls!

IIS will continue to read both ways!
I followed the tutorial
but i have a blank page in iis :confused: