| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 118635 | 2011-06-14 08:16:00 | apache rewrite redirect - just will not work | Morgenmuffel (187) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 1209207 | 2011-06-14 08:16:00 | Ok I have to write redirects on 2 servers there are 3 domains the site was formerly hosted under example.com and is now being moved to a different server using the name example.com.au example2.com is another name variant pointed at the server I need to have a redirect on the old server (its should be disappearing in 48 hours but until then) This doesn't work (on the old server) RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$[OR] RewriteCond %{HTTP_HOST} ^example2.com$ RewriteRule ^(.*)$ example.com.au [R=301,L] so I am currently using this rule RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$ #RewriteCond %{HTTP_HOST} ^example2.com$ RewriteRule ^(.*)$ example.com.au [R=301,L] But I do want to redirect both domains to the new host on the new server I have the following rule RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$ #RewriteCond %{HTTP_HOST} ^example2.com$ RewriteRule ^(.*)$ example.com.au [R=301,L] Now obviously i am having the same problem as the old server regarding redirection both domains. BUT I am also worried that I may create a loop would example.com.au be hit by this line RewriteCond %{HTTP_HOST} ^example.com$ and end up creating a loop? |
Morgenmuffel (187) | ||
| 1209208 | 2011-06-14 08:21:00 | Why are you redirecting anything at all from the new server? | inphinity (7274) | ||
| 1209209 | 2011-06-14 08:36:00 | Why are you redirecting anything at all from the new server? I am not trying to redirect from the new server, but the old domains will eventually be pointed at it (once the old server is turned off) and they are indexed in google so if somethings coming in to the new server as example2.com/bugs.com or example.com/bugs.com I want it to redirect to example.com.au/bugs.com |
Morgenmuffel (187) | ||
| 1 | |||||