Posted By

augoisms on 01/22/16


Tagged

webconfig


Versions (?)

rewrite subdomain to point to sub directory


 / Published in: XML
 

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

  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  

You need to login to post a comment.