|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi
On my Apache server, I have two aliases: http://cindy1.localdomain.com I create a new site called: http://cindy2.localdomain.com Now, I would like anyone who accesses the old site to be automatically redirected to the new site: http://cindy2.localdomain.com I do this in Apache: ServerAlias * Redirect permanent / http://cindy2.localdomain.com/redirect/ It seems to work OK if the sites are on different servers, but does not work on the same server. Thank you, Cindy |
|
#2
|
|||
|
|||
|
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cindy1\.localdomain\.com$ RewriteRule ^/(.*) http://cindy2.localdomain.com/$1 [R,L] Example: http://cindy1.localdomain.com to http://cindy2.localdomain.com/ http://cindy1.localdomain.com/path/blah.html to http://cindy2.localdomain.com/path/blah.html |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > url redirect |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|