Solved

apache redirect to another domain

Posted on 2004-08-09
5
638 Views
Last Modified: 2010-03-04
Hi All,

I have apache 2.0.40 in a redhat linux box.

On accessing the application, it is taken to say www.abc.com/lakshmi

Now is there some update i can do redirect all the requests coming to the webserver to be redirected to www.xyz.com/lakshmi.

If yes, can this redirect be done only as a fail over mechanism?

Please help
0
Comment
Question by:lakshminair
  • 2
5 Comments
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11761553
hello Lakshmi
You need to read the documenation available at
http://httpd.apache.org/docs/misc/howto.html
http://httpd.apache.org/docs/mod/mod_alias.html
after reading I am sure you will understand all else pls do put your queries
good luck
ronan
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 11763292
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . http://www.xyz.com/lakshmi
0
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11763338
ahoffmann's solution should work for you :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now