rewrite subdomain to point to sub directory


/ Published in: XML
Save to your folder(s)

bessie.blt.work will point to blt.work/bessie


Copy this code and paste it in your HTML
  1. <?xml version="1.0"?>
  2. <configuration>
  3. <system.webServer>
  4. <rewrite>
  5. <rules>
  6. <rule name="Redirect subdomain" enabled="true" stopProcessing="true">
  7. <match url="^(.*)$"/>
  8. <conditions>
  9. <add input="{HTTP_HOST}" pattern="^(.*)\.blt\.work$"/>
  10. </conditions>
  11. <action type="Rewrite" url="{C:1}/{R:0}"/>
  12. </rule>
  13. </rules>
  14. </rewrite>
  15. </system.webServer>
  16. </configuration>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.