Link to home
Start Free TrialLog in
Avatar of weesiong
weesiong

asked on

Web Redirect

Experts,

I have a website let say call http://www.xxx.com
and now i wish from http://www.xxx.com/yyy/ redirect to this http://www.xxx.com/zzz/

How to redirect my website to another location with server configuration without changing scripts?

Best Regards,
Wee Siong
Avatar of yuzh
yuzh

You can create a symbolic links to get the job done.

cd your-web-server-root-dir
mv yyy mybackup
ln -s /your-web-server-root-dir/zzz /your-web-server-root-dir/yyy

    Note: your old yyy dir becomes mybackup, when people use http://www.xxx.com/yyy/, it automatically point to http://www.xxx.com/zzz/

   

Avatar of weesiong

ASKER

yuzh,

If i am no any foder call yyy, how?

Best Regards,
Wee Siong
if you don't have a yyy dir, but you have zzz. do the followings:

1. login as root, or su as root

2. cd your-web-server-root-dir
   ln -s /your-web-server-root-dir/zzz /your-web-server-root-dir/yyy

   this create a a symbolic link for you.

   when some one try to access yyy, it goes to zzz

   I hope this can help.
your webserver has the ability to do this, usually.
In apache this is called Alias and/or ScriptAlias, it also has sevaral other redirect methods.
ahoffmann,

I havent try it, so yuzh way is correct?

Best Regard,
Wee Siong
ASKER CERTIFIED SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks :)

Best Regards,
Wee Siong