Forum Moderators: bakedjake

Message Too Old, No Replies

Symlink: how to...

...create one, and is it what I need to use?

         

bresso

1:21 pm on Oct 12, 2003 (gmt 0)

10+ Year Member



Hello,

I have 2 domain names, hosted on the same account. They do not point to the same directory (one points to the 'root' directory, and the other one points to 'site2').

All my content is located in the 'root' directory.

I wanted to know if I could use a symlink in the 'site2' directory so that all page requests are "redirected" to my 'root' directory?

If so, what is the correct way to create a symlink? I searched the forums but did not find anything.. so any help would be greatly appreciated.

Thank you! :)
Bresso

Nick_W

1:29 pm on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm a bit confused so wheter or not it's a good idea is beyond me but, here's how to do a symlink:

ln -s target directory¦linkname

do 'man ln' for better explanation ;-)

Nick

bresso

1:46 pm on Oct 12, 2003 (gmt 0)

10+ Year Member



Thanks for the help. Why are you not sure it's a good idea?

Nick_W

1:49 pm on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just mean that I'm unclear on what you want to do so wasn't sure....

Nick

bresso

2:07 pm on Oct 12, 2003 (gmt 0)

10+ Year Member



Well, I want both domains to point to the same content. However they're not set up that way, so I needed to find a way for the second domain to point to the first one's content. Is it clearer that way? ;) Not sure... Sorry english is not my native tongue.

Thanks for your help :)

Nick_W

2:10 pm on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Should work then: ln -s root_domain 2nddomain

Check the man page for the details but I *think* that's how it's done...

Nick

Nick_W

2:11 pm on Oct 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alternatively, ask your sysadmin to fix it in the httpd.conf file for you. It's much cleaner that way...

Nick