Solved

apache redirect

Posted on 2010-08-22
3
472 Views
Last Modified: 2013-12-28
Hello,
  I have web sites on solaris (php apache). I have to mirror these application on a different machine.  I would like to create a redirect  in apache. Here is an example:


ServerA  page = http:\\www.mysitesA\page.php
ServerB page = http:\\www.mysitesB\page.php

So when the user select the page on ServerA they are redirected to ServerB
0
Comment
Question by:SiemensSEN
  • 2
3 Comments
 
LVL 4

Expert Comment

by:Frozenice
ID: 33497576
create a htaccess file


redirect 301 /page.phpl http://www.siteB.com/page.php
0
 
LVL 4

Accepted Solution

by:
Frozenice earned 63 total points
ID: 33497580
update my post above


create a file name .htaccess
paste this line of code.


redirect 301 /page.php http://www.siteB.com/page.php

Open in new window

0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 62 total points
ID: 33497585
You only need to modify the configuration file in ServerA, please have a look at the example in http:Q_21270618.html
PS: you need to restart apache after you modify the  configuration file.
 
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

707 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

19 Experts available now in Live!

Get 1:1 Help Now