Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirect domain1 pointing to domain2

...with domain1 still showing in address bar of browser

         

jjstrawman

2:54 pm on Aug 25, 2010 (gmt 0)

10+ Year Member



I have a website temp address 123.45.678.90/~temp/ that I would like to point to www.domain.com while I am testing it before moving it to it's actual domain.

I've tried various things with the .htaccess file, however all I've done was succeeded in redirecting from the test domain to the temp URL. How can I "mask" the temp URL with the domain?

jdMorgan

5:42 pm on Aug 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See Apache mod_userdir. I think that's what you're asking about... Both www.domain.com and 123.45.678.90 must resolve to the same filespace on the same server for that to work, though.

There is no "masking" -- The browser always shows the URL that it requests, while the server is free to map that to any internal filespace that it likes; URLs and filepaths are not the same thing.

Also, domains are pointed to IP addresses in the DNS, not the other way 'round.

Jim