Web Hosting Talk







View Full Version : Redirect.


-Edward-
12-29-2000, 01:51 PM
Hi,

I want to redirect WEBDESIGNBYFAITHCAFE.COM to http://216.234.172.226/webdesign/ ( http://www.faithcafe.com/webdesign ). How do i do this?. Can it be done via the control panel?. Or do i need to edit the httpd.cof file?.

If possible i'd like to keep the domain showing rather than the subdirectory.

namehog
12-29-2000, 05:03 PM
I know what you need to do this!!!

I have a wonderful script that I made my self. What you can do is have a file and do the forwards like:

http://www.abc.com http://www.xyz.com

yes that simple, and all you have to do then is create a (A) record, you will need to gat an extra IP address for it but it is well worth it!!!

If you are interested please contact me (Thomas) on 0870 9059 444, and I will tell you how to do it and let you have the script etc!

Hope this helps!

(SH)Saeed
12-29-2000, 05:34 PM
Technics,

Simply create a new virtual site for your new domain.. Set it up on the IP you want (i.e your server IP) in your site admin control panel and tera-bytes DNS control panel. Then telnet and su to root. Type "pico /etc/httpd/conf/httpd.conf" and scroll down to bottom where your site info is. Now change DocumentRoot to the directory you want (i.e. "/home/sites/site1/web/webdesign"). Save it and then restart apache.

That should do the trick.

Saeed

namehog
12-29-2000, 05:45 PM
I think that my way may be better because you dont have to create a new virtual site, all you have to do is add one A record pointing at the ip address. You can have 1000's of domains pointing at the ip address.

The forwarder file can have as many domain forwarders in as you like line after line, so you can use it all the time on all your clients etc. It workd a treat and saves money in the long run.

the way you have done it is not very good when you have over 300 domain forwarders as you would have to set up that many sites. I dont! all i haveto do is put 1 A record in for each and it does the mail and the web forwarding, it is very good! You can control all your forwards very easily all from one straight text file. You simply put them line after line in one big file.

You have to put the file in /etc you would call it web forward then you have to run this command

$ makemap hash webforward < webforward

this then creates a webforward.db file

but you still need the cgi script that i have written to make it all work! That bit lives in the home directory of the IP address.

I will give you the script if you want it?

Let me know.

-Edward-
12-29-2000, 06:14 PM
send it to technics@flashtechnics.com please :).

(SH)Saeed
12-29-2000, 06:15 PM
namehog, ok.. I'm not trying to compete or come up with a better way. Just thought I share my knowledge and try to help.

Saeed
:beer:

Chicken
12-29-2000, 06:15 PM
Just another way:

Copy code below into notepad, save as .htaccess and set up the domain WEBDESIGNBYFAITHCAFE.COM on the server.

Put the .htaccess file in WEBDESIGNBYFAITHCAFE.COM's 'web' folder:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ http://www.faithcafe.com/webdesign/$1 [P]

Just throwing out alternatives...

-Edward-
12-29-2000, 06:22 PM
I've seen this rewrite feature on other sites does it cloak the url?.

Chicken
12-29-2000, 08:27 PM
Yeeee-up. Good for some quickie things. Even if you don't use it, make a copy of it. (Or feel free to bug me for it).

Félix C.Courtemanche
12-29-2000, 08:36 PM
the [P] part cloak the ip ONLY if you have mod_proxy installed. but since this is a 'Cobalt' part, you should have it in your default installation.

namehog
12-30-2000, 05:09 AM
ok, thanks for your other suggestions they are good too.

I will dig it out for you in the next couple of day and get it sent to you. I will make sure it has all the relevant instructions to make it work.

I hope you like it, and please let me know if you need help in setting it up!

Tom

-Edward-
12-30-2000, 09:07 AM
I used Chickens way for now but removed the [P] because it was causing a proxy error.