Domain Pointer Script Help

Discussion in 'DNS/Domain names' started by Ciwan, Mar 22, 2011.

  1. Hello Friends

    Can someone please tell me what code I need to place in the redirecting script so that when someone enters [ ] the are redirected to a folder within my root directory called [ ].

    I'm stuck and I would greatly appreciate any help.

    Thank You.

    Note: Mine is not a sub-domain. The tutorial provided by Winhost is for Sub-Domains. :(
    Last edited by a moderator: Oct 14, 2015
  2. Ray


    Last edited by a moderator: Oct 14, 2015
  3. Hello Ray

    I have gone ahead and created a default.aspx file and inside it I have put:

    If InStr( UCase(Request.ServerVariables("SERVER_NAME")),  UCase("") ) > 0 Then 
    End If 
    Is the above code right ? Also where do I upload that [default.aspx] to ?

    Thank You.
  4. Ray


    Yes this looks about right. And the default.aspx page should be uploaded to your root since that is where the initial http call is made. Also I just want to let you know it is typically bad practice to name a subfolder with a period.

    It should be named with one word without a period.
  5. Hello Ray

    I have gone ahead and changed the folder name to [ laughternode ]. Here is my script code right now:

    If InStr( UCase(Request.ServerVariables("SERVER_NAME")),  UCase("") ) > 0 Then 
    End If 
    Where SERVER_NAME is replaced with the name of my server.

    The problem is the above code does now work. It still redirects me to parent website. ( !
  6. Ray


    What did you use to create this web page? And what do you have in your default.aspx page? Do you only have the redirect script line.

    When I go to nothing comes up and it doesn't get redirect.
  7. Hi Ray.

    I used Notepad++ to create that page. All that is in it is the what you see above !

    As for the folder structure of my root directory, here is a screenshot:


    What am I doing wrong ? :(
  8. Ray


    Try this...

    Log into the server using IIS 7 Manager.

    Once you are logged in go to module labeled “URL Rewrite”.
    Click on ‘Add Rules…’, and choose ‘Blank rule’ from the Add rule(s) window
    Type a name for the rule.
    Make sure you choose ‘Matches the pattern’ in the Requested URL: drop down box and ‘Regular Expression’ in the Using: drop down box.
    In the Pattern text box type (.*)
    Click on the button ‘Add Conditions’ then under the drop down box labeled ‘Logical Grouping:’ choose ‘Match Any’ and click on the ‘Add’ button.
    Type {HTTP_HOST} for Condition input.
    Type ^mydomain\.com$ in the ‘Pattern:’ text box. Note the carrot sign ‘^’, the forward slash ‘\’, and the dollar sign ‘$’, these are regular expression symbols that you will need to add. Type the pattern just as I lay out.
    When the conditions are defined, you will be back in the Edit Rule window; choose ‘Rewrite’ in the ‘Action Type:’ drop down box.
    In the ‘Rewrite URL:’ text box type \sub1\{R:1}
    Put a check mark next to ‘Append query string’.
    Click on the Apply. Your rule is now setup.

    Bear in mind that \sub1\ is the folder where you uploaded your website into and is the domain name you want to filter.
    Last edited by a moderator: Oct 14, 2015
  9. Thanks Ray.

    I'm trying to login into IIS, but I get an error saying it can't connect [401 Error] ! For Server name what do I put ? Just the 3 letter server name ? or is it something else ?

    For Username and Pass, I'm using the same ones as the FTP.

    Thanks :(
  10. Ray


    Make sure you choose Connect to Site and not Connect to Server. That is often the common mistake. And use for the server name and site name. is only the domain pointer so the site name for the account will be
  11. Thank You Ray. now works. I still have things to fix on it (so don't be surprised if you get errors).

    However there is still a slight problem with the Domain Pointer.

    [ ] does not work.

    Only [ ] works.

    I need them both to work :(


    PS. What happens when I add a sub-domain ? Do I have to go through all that again ?
  12. Ray


    If that is the case you will also need to add the condition


    Yes, you need to add rules for each of them.
  13. Hi Ray

    So just to clarify, in order to get my sub-domain working, I need to do the following again:

    Remember, this time it is a sub-domain. So would I do this for the reg expression >> ^c1taskd\.jzendev\.com$ ?

    [ c1taskd ] being the name of my sub-domain ?

    PS. Adding the 2nd condition made [ ] work as well.

    Thank You.
    Last edited by a moderator: Oct 14, 2015
  14. Ray


    Yes. That is correct.
  15. Thank You. All seems to be working fine (as far as Domain and Sub-Domains go). :)

Share This Page