Redirect the traffic for to the subdirectory /mypenates

Discussion in 'DNS/Domain names' started by and900mor900, Mar 12, 2011.

  1. In the root directory /lawgarag there is a file:Winhostdefault.htm

    I want to redirect the traffic for to the subdirectory /mypenates.
    I have set up a sub domain pointer /mypenates.

    I have copied the code from the knowledge base article into the Winhostdefault.htm file as below:

    HOWEVER THE TEXT between the <% .. %> is grey in VIsual Studio. This may be the main issue.

    <!DOCTYPE html>
    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("") ) > 0 Then
    End If
    <link rel="SHORTCUT ICON"

    As per the instructions I have modified the
    1. Replace with your actual subdomain URL . : -
    2. Replace /subdomain with your actual subdirectory name. :- /mypenates
    However still displays the page for Law Garage in the root directory not the page at /mypenates

    Last edited by a moderator: Oct 14, 2015
  2. OK I have resolved this myself. You need a page with the aspx extension not htm extension
  3. Yes, the code was made for asp so it needs to be in a asp or aspx page.

    Glad to hear you got it working.

    I believe you brought up the IIS module called "URL rewrite" in a ticket, which is also another option to performing these types of redirects without having to write the code manually.

    Customers can access this module through IIS manager.
    Last edited by a moderator: Oct 14, 2015

Share This Page