Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 26th, 2001, 10:35 AM
edwards151 edwards151 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 26 edwards151 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
domains

Our web site domain has recently changed from mydomain1.com to mydomain2.com. However, there are still urls floating around out there from search engine bots etc. that include mydomain1.com, making a lot of broken links. Any url on the site must use the new mydomain2.com because of a Perl script that basically runs the site.

My question: Is there a way to configure Apache so that any request for mydomain1.com is automatically changed to mydomain2.com? This would include longer URLS like mydomain1.com/images/myimage.jpg which would be automatically changed to mydomain2.com/images/myimage.jpg

Any help would be greatly appreciated.

Jon

Reply With Quote
  #2  
Old July 26th, 2001, 12:52 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There are many ways to solve this problem. Say to use mod_rewrite, you should/must use external redirection:

# http://www.domain1.com

RewriteEngine on
RewriteRule ^(.*) http://www.domain2.com$1 [R,L]

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > domains


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway