PDA

View Full Version : Redirect not working?


musictech
02-19-2003, 01:23 PM
Maybe I'm just doing it wrong, but whenever I try to set up a redirect from the DSM File manager, and then try to test it out, nothing happens.

Can you redirect from one domain/account to another web domain?

In the File Manager Redirect setup, I simply entered the root directory as the location that I want to redirect from, and then the URL of the other domain (on the same server) that I want it redirected to, but then the redirect doesn't work.

Obviously I could just put up a simple index page in that domain with an HTML redirect in the header, but I thought maybe the DSM redirect would be more elegant.

Thanks.

Steve

Nvrmore100
02-24-2003, 01:20 PM
Did you try just adding a hostheader for the old site onto the new one? There is no need to have both sites, the only benefit would be the change in the address bar in the browser.

musictech
02-24-2003, 01:27 PM
Well, it's kind of a unique situation.

For some reason, we had it set up so that the machine name and main name server is ns.dbarproductions.com . So, originally I was only using dbarproductions.com as the machine name and name server and didn't even have a site there....
I used dbar-productions.com as my main web site.
This time around, the hosting company guy told me I should try to set up a second name server, ns2.dbarproductions.com, on the same machine, but that I would have to add an account/domain for dbarproductions.com so that we could modify the DNS to make it work. So, now dbarproductions.com is a web accessible domain, and I simply wanted it to automatically forward to dbar-productions.com. I'll just use a simply HTML forwarding script, I guess.

Nvrmore100
02-24-2003, 01:33 PM
Well like I said, this is pretty easily done with a host header.

2 ways you can do fairly simply are to either add the dbarproductions.com to the admin user of dbar-productions.com with the "linked to" option checked when you do it (this will only create a hostheader). Or you can manually edit your /usr/local/apache/conf/vhosts.conf and put in the line:

ServerAlias dbarproductions.com *.dbarproductions.com

Under the entry for:

Servername dbar-productions.com

musictech
02-24-2003, 01:44 PM
Thanks.

I'll play around with it and see what works the best. I just want to be sure not to screw up the DNS stuff that the hosting guy manually entered for me (I'm not great at Linux/Unix stuff).

Steve

Nvrmore100
02-24-2003, 01:49 PM
Originally posted by musictech
Thanks.

I'll play around with it and see what works the best. I just want to be sure not to screw up the DNS stuff that the hosting guy manually entered for me (I'm not great at Linux/Unix stuff).

Steve

Ok if you are going to have DNS issues then go for the HTML redirect. It's going to make this process a lot simpler than messing with your DNS configs if you aren't experienced with it.

Here is some code if you need it:

<html>
<head>
<meta http-equiv="REFRESH"
content="5;URL=http://www.someplace.com">
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">

<title></title>
</head>

<body>
Some message for them to read while they wait.
</body>
</html>


The number after "content=" is the number of seconds to wait before you redirect. 1 second is the lowest you can set.

musictech
02-24-2003, 02:00 PM
Thanks.

Simple HTML redirect is just fine for my needs. Best not to screw around with DNS and other stuff until I get more knowledgeable about all of this.