Facebook

Sunday, January 31, 2016


Web config file - alternative of htaccess in windows machine
<?xml version="1.0" encoding="UTF-8"?> <configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Clean URL" stopProcessing="true">

                <match url="^news/(.*).html" />
                <action type="Rewrite" url="/newssingle.php?url={R:1}" appendQueryString="true" />

                </rule>
                <rule name="Clean URL 1" stopProcessing="true">

                <match url="^index.html" />
                <action type="Rewrite" url="index.php" appendQueryString="true" />

                </rule>
                <rule name="Clean URL 2" stopProcessing="true">

                <match url="^newsevents.html" />
                <action type="Rewrite" url="newsevents.php" appendQueryString="true" />

                </rule>
                <rule name="Clean URL 3" stopProcessing="true">

                <match url="^contactus.html" />
                <action type="Rewrite" url="contactus.php" appendQueryString="true" />

                </rule>
                <rule name="Clean URL 4" stopProcessing="true">

                <match url="^services.html" />
                <action type="Rewrite" url="services.php" appendQueryString="true" />

                </rule>
                <rule name="Clean URL 5" stopProcessing="true">

                <match url="^aboutus.html" />
                <action type="Rewrite" url="aboutus.php" appendQueryString="true" />

                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Clean URL" stopProcessing="true">
                    <match url="^(.*).html" />
                    <action type="Rewrite" url="/pages.php?page_slug={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

No comments:

Post a Comment