Web Hosting Talk







View Full Version : How to point www.yyy.com to www.xxx.com/~zzz ?


raylin
06-27-2001, 11:35 PM
Can I do that on a Cobalt 4i ?
If yes, what are the steps to do this ?
Should I add cname for www.yyy.com to www.xxx.com and edit httpd.conf for www.xxx.com ?

Thanks a lot for your help,

Ray

Chicken
06-28-2001, 12:58 AM
Well, you could try a symbolic link, though you might encounter cgi wrap errors (a permissions problem where the user does not have permission to run a script in a certain directory), which should be able to be fixed. Something like:

ln -s /home/sites/www.xxx.com/users/zzz/web /home/sites/www.yyy.com/web

One thing I'd do is use the site#'s instead of www.xxx.com and www.yyy.com above. If you do encounter cgi wrap errors, this might take care of that, though I am not 100% certain:

cd /home/sites/www.yyy.com
chown zzz.home web/

Again, I'd replace www.yyy.com with the site# and again, I'm not entirely sure about this one. Can someone else take a look at this and let me know if this is correct or if I goofed somewhere?

raylin
06-28-2001, 01:23 AM
Thanks, Chicken.

From your suggestion, I think I have to :

1. add virtual site for www.yyy.com
2. add CNAME to point www.yyy.com to www.xxx.com
3. create a link from /home/sites/site#_of_yyy/web to
/home/sites/site#_of_xxx/users/web


Is there any way that I don't need to add a virtual site for www.yyy.com ?

Chicken
06-28-2001, 01:50 AM
Ooops sorry, forgot to mention about that stuff. For this, forget about CNAME. Yes, you'd have to create the virtual site www.yyy.com and then you are basically mapping one folder to another.

-You could also use a service like http://www.mydomain.com and point the domain to a path (this service might be available from your registrar as well).

raylin
06-28-2001, 09:22 AM
Really appreciated, Chicken.

:D :D :D

Chicken
06-28-2001, 12:29 PM
Good...

Question: have you tried to upload a script (user zzz) and encountered any errors with the cgi-wrap? If so, did you try setting permissions ala:

cd /home/sites/www.yyy.com
chown zzz.home web/

???

raylin
06-29-2001, 08:06 AM
Originally posted by Chicken
Good...

Question: have you tried to upload a script (user zzz) and encountered any errors with the cgi-wrap? If so, did you try setting permissions ala:

cd /home/sites/www.yyy.com
chown zzz.home web/

???

I did not test if cgi scripts work or not.

Before I "chown zzz.home web/", it did fail to browse www.yyy.com (no permission). But after chown everything goes very well.

I think "chown zzz.home web/" is the key step (I don't realy understand this thou), right ?

addady
06-29-2001, 04:19 PM
What abut the case www.xxx.com/~zzz is on other
server lets say www.geocitys.com/~balabla

How can I do it ?

Chicken
06-29-2001, 05:46 PM
Path forwarding, use a free service like http://www.mydomain.com

I sent you an email raylin, but didn't check if you listed a valid one or not.

kunal
06-30-2001, 06:08 AM
or you could just use mod_rewrite?

Chicken
06-30-2001, 02:10 PM
I hope you are asking me, heh. I dunno, I've had problems with the RaQ4s rewriting thigs and basically ignoring what I put. I'm sure I didn't do something right but I never figured out how to get it so it worked. I scoured the apache pages and tried just about everything I could find, but someone else with a better understanding of it might be able to get it right. :bawling:

kunal
07-01-2001, 01:53 AM
well ive been trying to use this code to do it...

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain-they-come-from\.com [NC]
RewriteCond %{HTTP_HOST} ^domain-they-come-from\.com [NC]
RewriteRule ^(.*) www\.main-domain-name\.com\/form\.php\?{HTTP_HOST} [R,L]


found the bug and fixed it :)

raylin
07-01-2001, 05:22 AM
Chicken,

Originally posted by Chicken
I sent you an email raylin, but didn't check if you listed a valid one or not.

Yes, I got it. Sorry for my late reply.

Originally posted by kunal

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain-they-come-from\.com [NC]RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} ^domain-they-come-from\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) www\.main-domain-name\.com\/form\.php\?{HTTP_HOST} [R,L]


Wow. I have to do homework to study these strange directives. Can anybody suggest where to start ? (Good online tutorial)

iplexx
07-01-2001, 10:41 AM
Originally posted by raylin
Wow. I have to do homework to study these strange directives. Can anybody suggest where to start ? (Good online tutorial)

mod_rewrite docs
http://httpd.apache.org/docs/mod/mod_rewrite.html

url rewriting guide
http://httpd.apache.org/docs/misc/rewriteguide.html

good luck, you'll need it :)

raylin
07-01-2001, 11:38 AM
Originally posted by iplexx


mod_rewrite docs
http://httpd.apache.org/docs/mod/mod_rewrite.html

url rewriting guide
http://httpd.apache.org/docs/misc/rewriteguide.html

good luck, you'll need it :)

I add them into my bookmark list.
Thanks a lot,

Ray

JoeM
07-01-2001, 05:17 PM
Originally posted by raylin
Can I do that on a Cobalt 4i ?
If yes, what are the steps to do this ?
Should I add cname for www.yyy.com to www.xxx.com and edit httpd.conf for www.xxx.com ?

Thanks a lot for your help,

Ray


Why not just set up an index.cgi script to do the pointing for you? That's what we have and it works like a charm. AND, I don't have to get into the friggen config file everytime I want to point another address.

raylin
07-02-2001, 09:22 AM
Originally posted by JoeM

Why not just set up an index.cgi script to do the pointing for you?


By this way, will 'http://www.yyy.com' or 'http://www.xxx.com/~zzz' be kept on top of I.E. browser ?

JoeM
07-02-2001, 05:08 PM
Originally posted by raylin


By this way, will 'http://www.yyy.com' or 'http://www.xxx.com/~zzz' be kept on top of I.E. browser ?

The short n' simple cgi we use does no address masting, so http://www.xxx.com/~zzz is put in the Address bar.