Page 1 of 1

Re-directing domains

Posted: Fri May 23, 2008 7:19 am
by spacebiscuit
Hi,

i'm not sure if this is the correct place to post this question but here goes.

I want a domain to redirect to another domain. I have seen the frames method of doing this but when I browse the target URL the address bar just displays the root address of the of the second domain regardless of the page(s) viewed.

I am sure I have seen a method whereby the URL is re-writeen or replace with the new doamin name and correctly displays the directory/structure of the target site?

Any ideas? Thanks in advance,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 9:43 am
by pickle
Do you have access to your apache configuration files? If not, can you use an .htaccess file?

By the way - I've moved your thread to "Installation and Configuration". The previous forum wasn't wrong, but this one gets more traffic.

Re: Re-directing domains

Posted: Fri May 23, 2008 9:45 am
by spacebiscuit
I do not have direct access no, but could possible i fI ask my host.

What is the htaccess method?

Thanks,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 9:58 am
by pickle
Do a Google for "htaccess redirect" or "htaccess domain redirect" - there are lots of tutorials out there.

Re: Re-directing domains

Posted: Fri May 23, 2008 10:33 am
by spacebiscuit
Are ou sure this method will display the new doamin in place of the original domain?

Thanks,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 2:21 pm
by VladSun
I'm pretty sure - try it :)

Re: Re-directing domains

Posted: Fri May 23, 2008 2:32 pm
by spacebiscuit
No all I can find are methods which re-direct and display the target site's domain name. The only way I can find to use the new sites domain is by clocking but this uses frames which I do not want to use as it does not read my session variables.

Thanks,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 2:34 pm
by pickle
Depending on which tutorial you've found - it depends. Doing a "redirect" from domainA.com to domainB.com will forward any requests for domainA.com to domainB.com - so a user looking for http://www.domainA.com/ will be forwarded to http://www.domainB.com & see http://www.domainB.com in their address bar.

If you're interested in having http://www.domainB.com appear, but have http://www.domainA.com show in their address bar, you're looking for a "rewrite".

Re: Re-directing domains

Posted: Fri May 23, 2008 2:40 pm
by spacebiscuit
I need a re-write then I guess.

Not only has domainA got to show in the address bar but it must also replace domainB in the address bar. Like I said cloaking/masking does not work as my session variables are then not read.

Thanks,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 2:43 pm
by pickle
Well, look into mod_rewrite then.

Re: Re-directing domains

Posted: Fri May 23, 2008 3:48 pm
by spacebiscuit
I am going around in circles - my google search keep bringing up papes that I have viewed hours ago.

Any links to a tutorial would be apprciated.

Many thanks,

Rob.

Re: Re-directing domains

Posted: Fri May 23, 2008 5:06 pm
by pickle
I don't know of any other than what Google would bring up.

Re: Re-directing domains

Posted: Fri May 23, 2008 5:13 pm
by spacebiscuit
I actually don't think it is possible with the rewrite_mod - it has to be done server side with an alias.

Thanks,

Rob.