URL Redirect and Rewrite

Discussion in 'DNS/Domain names' started by joelilly, Apr 30, 2015.

  1. I need some help on how to do a URL Redirect and Rewrite.

    Here is what I have:

    my domain is jmlilly.com
    my website is in the subfolder jmlilly.com/testwebs/jmlilly/
    I've been keeping a default asp page in my root that does the redirect in script like this:

    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("jmlilly.com") ) > 0 Then
    Response.Redirect("/testWebs/jmlilly/Default.aspx")

    That has been working, however the user sees the subfolders in the addresss. I don't want that. I want the user to see:
    http://www.jmlilly.com

    I am advised to replace the asp script and to use iis manager to do all this in web.config files instead. I can run iis manager (v8.5) and connect to my site. I have been trying to write the rules and conditions. I've read numerous articles and have tried manually writing sections into web.config in both root and subfolder but so far all have failed.

    Can someone provide a walkthrough on this?

    Thanks.
     
  2. ComputerMan

    ComputerMan Winhost Staff

    Michael likes this.

Share This Page