Forum Moderators: phranque
RewriteEngine On
RewriteCond %{HTTP_HOST} ^.*oldwebsite\.com.ar$ [NC]
RewriteRule ^(.*)$ http://www.newwebsite.org.ar/$1 [R=301,L]
Any ideas on how to make it work?
Thanks in advance,
Jimbar
[edited by: jdMorgan at 12:36 am (utc) on Feb. 7, 2008]
[edit reason] de-linked [/edit]
Place the following in the OLD website
RedirectMatch 301 oldwebsite\.com.ar(.*)$ [newwebsite.org.ar$1...]
You might explore one of the registrar free accounts (who ever your domain names are registered with) and see if the FREE offers htaccess.
Then if the old domain is still active, place that website there, for the mere purpose of redirect.
Let's back up a bit, though. Please tell us what you mean by "it doesn't work," since this phrase is so general as to be meaningless.
How did you test?
What were the results?
How did those results differ from your expectations?
Jim
[edited by: jdMorgan at 12:38 am (utc) on Feb. 7, 2008]
Thanks in advance
Options +FollowSymLinks
RewriteEngine on
#
RewriteRule ^foo\.html$ http://www.webmasterworld.com/apache/3566602.htm [R=301,L]
It's not clear what you mean by "registrar's account" -- Your registrar registers your domain name. It may or may not provide your DNS services or a 'domain pointing' service that is essentially a tiny hosting setup that includes only a redirect to another domain (redirect only, no 'Web site' content).
Unless the domains are hosted separately, your Web hosting service must be set up to handle requests for both the old and new domains. Usually, this feature is indicated by the presence of selections for "Add-on domains" in your hosting control panel.
Again, it will be very helpful to use the three-question list above when describing a problem: Otherwise, we may spend a whole day trying to fix your code, only to discover that the problem is in your DNS configuration. When that happens, members' interest level often wanes, distracted by newer threads with more-clearly-described problems. So it's in your best interest to be verbose about how you tested and what happened.
Jim
RewriteEngine on
#
RewriteCond %{HTTP_HOST} oldwebsite\.com\.ar [NC]
RewriteRule (.*) http://www.newwebsite.org.ar/$1 [R=301,L]
This method assumes that the HTTP/1.1 Host header arrives at your server with the correct (old or new) hostname in it, and that your server is configured to recognize both hostnames and deliver them to your 'account' filespace. This will not be the case unless there is a CNAME or A record in your DNS zone file -- Or more accurately, this will not be the case if you use a frame-based domain "pointing" service rather than a proper DNS setup or a redirect-based domain "pointing" service.
Jim