Web Hosting Talk







View Full Version : What is the best and easiest solution for a url redirect?


JavaDziner
11-11-2009, 01:44 PM
I have a question about redirecting domain methods. I want to use something very simple, to accomplish a simple task.

The task -
My website, for example, is www.mysite.com, and I would like to have my customers choose a domain name for their business, and then have their domain redirect to my site.
So if they had www.theirsite.com, I would want it to go to my site at, for example, www.mysite.com/customers/index.jsp

What is the easiest way to go about doing that? I recently bought an additional domain to test this all out. I'm in testing phase on my website.

I did some googling on this topic, and I have found the following options:
mod_rewrite (module)
mod_alias (module)
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=www.mysite.com/customers/index.jsp">

I like the 3rd option because it is the simplest. But the problem with the meta-http refresh is that it has been acting in this way - I access www.theirsite.com and it redirects to http://www.theirsite.com/www.mysite.com/customers/index.jsp
Why is it appending the url to the current one like that???

NeilAgg
11-11-2009, 01:53 PM
Have you tried putting the entire url in the Meta tag, including the http://?

Pandend
11-11-2009, 02:10 PM
Normally it is done by url-cloaking using a frameset, so the top-level frameset is in the domain that appears within the address bar, and the one frame loads a site from actual source. For example (this would go in the index page for a cloaking domain):

<frameset><frame src="http://www.mysite.com/customers/index.jsp"></frameset>

Remark: All modern browsers use and support framesets today.

NeilAgg
11-11-2009, 02:13 PM
I dont think he is looking for cloaking. He wants the final url in the browser to be the redirected site.

JavaDziner
11-11-2009, 02:25 PM
Have you tried putting the entire url in the Meta tag, including the http://?
Thank you! That did the trick:) It works as it should now. I'm so glad.

Normally it is done by url-cloaking using a frameset, so the top-level frameset is in the domain that appears within the address bar, and the one frame loads a site from actual source. For example (this would go in the index page for a cloaking domain):

<frameset><frame src="http://www.mysite.com/customers/index.jsp"></frameset>

Remark: All modern browsers use and support framesets today.
That is an excellent option as well! Thank you:)

JavaDziner
11-11-2009, 02:28 PM
I dont think he is looking for cloaking. He wants the final url in the browser to be the redirected site.

Hmmm, well, cloaking the site could be an option for me. I guess I'll have to give both options some additional thought.

Thank you both again for the timely responses and solutions, much appreciated.

loony
11-12-2009, 11:26 AM
header ("Location: url including h t tp");