Hi,
On my server I can use, as an example, mydomain.com~myusername, to view a domain until the DNS propagates.

For the sake of this question, let's refer to that domain URL format as the "temporary domain". And lets refer to this domain URL format, mydomain.com, as the "permanent domain".

My question is this:
In the website pages, is there a way to create all link references to the permanent domain and use some sort of server feature that replaces the permanent domain reference in the links with the temporary domain reference? Then, when I set the DNS, I would turn off that server feature.

Thanks!

    Well, I must say the whole "mydomain.com~myusername" explaination is a bit cryptic. perhaps you meant...

    yourdomain.com/~someusername ="temporary domain"
    somedomain.com ="permanent domain"

    ...? A realife example might be:

    dwest.com/~bretticus ="temporary domain"
    bretticus.com ="permanent domain".

    You may be looking for Apache mod-rewrite.

      Sorry!
      Actually, since the domain's DNS hasn't been set yet, the host uses the ipaddress instead.

      So the temporary domain would be
      [url]http://123.456.789.123~username[/url].

      I mistyped "mydomain" instead of "my ip address" Sorry for the confusion.:o

      I'll check into Apache mod-rewrite and see if that might be a solution.

      Thanks for the tip!

        dwest wrote:

        [url]http://123.456.789.123~username[/url]

        You're welcome. However, don't you mean http://123.456.789.123/~username? Otherwise, you'd be using DNS and try ing to lookup a host named "123.456.789.123~username."

          Yes, you are correct. Left off the "/" after the ip address.
          Sorry...

            I took a look at mod-rewrite...yeeeeow!...complicated.

            Looks like it would accomplish what I want to do but I haven't a clue how to make it do it.

            Basically I would want to take any URL request containing "www.domainname.com" or "domainname.com" and replace "www.domainname.com" or "domainname.com" with "ip_address/~username". All the stuff in the URL before and after the replacement should remain intact.

            Any pointers in the right direction would be greatly appreciated. All I need is a little push :-)

            Thanks!

              14 days later

              dont you just need to set the domain to point to that dir?

                You don't need mod_rewrite to set up a permanent redirect. Simply use the "Redirect" directive in the relevant part of the Apache config. In most cases, this is much more straightforward.

                Mark

                  Write a Reply...