url rewrite to subfloder for main domain?

Discussion in 'Site Programming, Development and Design' started by Scott, Mar 18, 2014.

  1. Not sure if this can be done. I have wordpress installed in the root directory, but I don't want it live yet. I have hrnightmare.net as the main domain. I wanted to point hrnightmare.net to a subfolder (/temp) and was hoping i could use the temporary Winhost given domain http://hrnightm.w16.wh-2.com/ which would point to the root folder. Can that be done?

    Thanks in advance for any help!
     
    Last edited by a moderator: Oct 14, 2015
  2. Yes this can be done through some redirection scripts, here is how I see this working out:

    Put a redirection script in your root's default document that will redirect requests using "www.hrnightmare.net" and "hrnightmare.net" to your /temp subdirectory, but ignore request using your secondary URL, this way your domain will resolve to your temp site and your secondary URL will resolve to your WordPress installation.

    These redirection scripts can be used to accomplish the redirection.

    http://support.Winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx

    You would use two IF clauses, one for your "www." subdomain and one for you root domain.
     
    Last edited by a moderator: Oct 14, 2015
    ComputerMan and Michael like this.

Share This Page