Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

apache redirect

Posted on 2010-08-22
3
Medium Priority
?
520 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 252 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 248 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

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

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…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

972 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