how to remove Index.php from iis windows server urls

For the sample application, the relevant mod_rewrite rules in the .htaccess file are:

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]

RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

The IIS URL Rewriter module can read these rules and translate them. The translated URL Rewriter rules are:

<rewrite>

  <rules>

    <rule name="Imported Rule 1" stopProcessing="true">

      <match url="^(.*)$" ignoreCase="false" />

      <conditions>

        <add input="{HTTP_HOST}" pattern="^example\.com$" />

      </conditions>

      <action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />

    </rule>

    <rule name="Imported Rule 2" stopProcessing="true">

      <match url="^(.*)$" ignoreCase="false" />

      <conditions>

        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />

        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />

        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />

      </conditions>

      <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />

    </rule>

  </rules>

</rewrite>

Related Blogs

pwd-system-asenwebmedia

How to remove sAntivirus | Segurazo Virus?

I have made this video "How to remove sAntivirus" only because I have troubled with this unwanted software and thought that if same type of problem arises for others then they can get help with this video as well as my blog. SAntivirus software or threat comes automatically in my laptop or it may come from other software installation from website or it may come any browser when installing extra browser plugins or browser extensions. There may be any reasons to come this virus as I was not aware of this..

pwd-system-asenwebmedia

How to backup databases in SQL server | cloud backup

To back up the database regularly is the most important part of any business or company. Not only the IT person, common employee should know the process of backup of SQL Server. This is very simple and easy to understand. I have made this video 'How to backup databases in SQL server' through Microsoft Visual Studio for those people who doesn't know how to do this. In information technology, a backup, or data backup is a copy of computer data taken and stored elsewhere so that it may be used to restore the original after a data loss event.

pwd-system-asenwebmedia

How to create a google account - what is gmail?

I have made this video "How to create a google account" for the youtube viewers and for those who does not know how to create a new google account. This is very basic introduction for the beginners. First open google chrome and search for as 'create google account' and then open the first link https://account.google.com then you will ask for your details to input like your first name, your last name, gmail id, password and confirm password and your phone number. So, input all the information correctly then click next and accept the agreement..

List of Categories

  • 5 Internet Basics
  • 14 PHP & MySql
  • 7 PHP & MSSQL SERVER
  • 2 How to trade in stock market