Web Hosting Talk







View Full Version : URL Forwarding...again


webfors
02-06-2001, 06:48 PM
Hi everyone,

Ok, I know we've discussed this a couple times already and we always came to the conclusion that to setup url forwarding for a domain name to a subdirectory of another domain name you would have to use a redirect script.

Now, I have done this without problems on my server. (ie: http://www.videomatch.org). Now what I want to know is how can I do this and KEEP the "entered" domain name in the address field of the browser (ie: http://www.giftsfromheavenonline.com). I know some registrars offer this, like http://www.registrars.com/static/partner/forwarding_login.shtml. SO, how is this done???

[Edited by tabernack on 02-06-2001 at 05:50 PM]

Chicken
02-06-2001, 10:13 PM
Worked wonderfully on my ol' RaQ3, but doesn't work on my RaQ4 and if you can get it to work on the RaQ4, then I'll be your very best friend:

.htaccess file in the subdomain/domain's web folder, which leads to the uers dir. that you want to redirect to.

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ http://www.domain.com/~user/$1 [P]

Keep in mind that I need this for my server and I can't get it to work. I'm sad due to this.

Dylan
02-06-2001, 10:24 PM
I don't believe that's what tabernack is looking for as it doesn't keep the domain name stuck in the window.

Dexter
02-06-2001, 11:12 PM
well it isn't the best way... but if you just need to do one website this'll do... just fill in the blanks and drop this page into the url that you want to get redirected to the other one...

----
<html>

<head>
<title>put your title here</title>
</head>

<frameset rows="*">
<frame name="top" src="http://www.put your url here.com">
<noframes>
<body>

<p>This page uses frames, but your browser doesn't support them.</p>

</body>
</noframes>
</frameset>

</html>

----

Racin' Rob
02-07-2001, 01:06 AM
What about having a full entry in your http.conf file as if it was a normally hosted domain, but change the document root to the correct absolute path to the directory you want to use.

<VirtualHost 200.201.202.203:80>
ServerName videomatch.org
ServerAdmin "you@domain.com"
DocumentRoot /usr/local/plesk/apache/vhosts/buyitonline.com/httpdocs/videomatch
</VirtualHost>

You can use a RedirectPermanant line instead of a script to have it work the same as it does now.

<VirtualHost 200.201.202.203:80>
ServerName videomatch.org
ServerAlias w ww.videomatch.org
ServerAdmin "you@domain.com"
RedirectPermanent / "http://buyitonline.com/videomatch/"
</VirtualHost>

webfors
02-07-2001, 01:29 AM
The url I want to redirect to is not on my server, hence, the absolute path idea wouldn't work.

Racin' Rob
02-07-2001, 09:44 AM
Sorry, missed that part. The only way I know of is the use of frames like Dexter suggested.
I'm not sure how mydomain.com does it. It seems to me their URL forwarding works the way you want it to.

Chicken
02-07-2001, 08:57 PM
Originally posted by Dylan
I don't believe that's what tabernack is looking for as it doesn't keep the domain name stuck in the window.

In fact, it did on the RaQ3 *but* not sure if it works off server, nor if it would work on something else besides a RaQ3 (doesn't work on RaQ4).

Dylan
02-07-2001, 09:23 PM
Mmm... doesn't work for me. It does a standard forward for me.

If you redirect me.com to you.com, you.com appears in the addy.

The [P] doesn't work for me either. I had to delete it to get it to work.

Chicken
02-08-2001, 08:49 AM
It worked really well on *one* server heh. *sigh* Is there anyone handy with this sort of thing?

(P.S. On the new server I had to delete the [P] to get it to work at all as well... BUGGER!).