Solved

Web Redirect

Posted on 2002-06-05
7
328 Views
Last Modified: 2010-04-21
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
0
Comment
Question by:weesiong
  • 3
  • 3
7 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 7058454
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/

   

0
 
LVL 7

Author Comment

by:weesiong
ID: 7058525
yuzh,

If i am no any foder call yyy, how?

Best Regards,
Wee Siong
0
 
LVL 38

Expert Comment

by:yuzh
ID: 7058606
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.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 7058707
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.
0
 
LVL 7

Author Comment

by:weesiong
ID: 7058741
ahoffmann,

I havent try it, so yuzh way is correct?

Best Regard,
Wee Siong
0
 
LVL 38

Accepted Solution

by:
yuzh earned 50 total points
ID: 7058761
In apache, you can change the httpd.conf file to make a alias to do the job.

you can add someting like:

Alias /yyy/ "/full-path-to-zzz/"

or just do what I told you before.


 
0
 
LVL 7

Author Comment

by:weesiong
ID: 7058798
Thanks :)

Best Regards,
Wee Siong
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
llcommand 6 91
recommend secure & efficient Unix LDAP (equiv of Windows AD) 6 107
Access_log 17 121
remove one line from a file in solaris 8 29
Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question