[email protected] (+855) 68 666 420

    Newsletter

    When we use .htaccess for user friendly URL on OSclass CMS may not work on hosting with IIS Web Server.

    To convert rules from .htaccess to web.config you can use import feature of the IIS URL Rewrite Module:

    1. go to IIS Manager
    2. click you site in the tree
    3. double-click URL Rewrite in the Feature View
    4. click Import Rules in the Actions panel
    5. paste your .htaccess rules into the Rewrite rules textbox and you’d see your converted rules below.

    More info about this feature.

    For instance your rules are converted into these ones:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Imported Rule 1" stopProcessing="true">
                        <match url="^index\.php$" ignoreCase="false" />
                        <action type="None" />
                    </rule>
                    <rule name="Imported Rule 2" 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" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    
    
    somsothea

    A MBA and Computer Science graduate, keen on stirring up creative mind and information into PHP project ideas and working as a freelancer for PHP projects with source code. He also work in VB.net and IT Consultation for SMEs. Sothea likes to learn new things related to his profession. You can contact him for any Project development, Web Development either consultation on business registration for your startup.

    leave a comment