Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2013
    Location
    India
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to use redirectory code in Windows based hosting?

    As we know .htaccess file does not support windows based hosting. So want to ask,How we can use 301 redirection code in IIS based hosting site?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You configure the action type in the web config.xml.
    Code:
    <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>
    Is what I am told on this page: http://www.iis.net/learn/application...-iis-webconfig
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •