Problem
I have a new TYPO3 website on a new domain. All important pages of the old website point to their new counterpart for which I added individual 301 redirects in the .htaccess. Those work fine!
However there are pages which have the exact same URL as the old website, which I cannot add individual redirects for (infinite loop). For example /contact/. When I access http://www.example-old.com/contact/ the page simply redirects to /index.php. Why?
Wishlist
- All non-www should be redirected to www (works)
- Other domains should be redirected to new (works)
- Referrals from the old website, should be redirected to the same URL on the new domain, unless a manual 301 redirect is in place. (does not work)
Current setup
This is the .htacess snippet I'm working with:
<IfModule mod_rewrite.c>
# Enable URL rewriting
RewriteEngine On
RewriteBase /
# Point old domain to new domain
RewriteCond %{HTTP_HOST} ^example-old\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^example-new\.com$ [NC]
RewriteRule ^(.*) http://www.example-new.com/$1 [R=301,L]
# Point idle domains to new domain
RewriteCond %{HTTP_HOST} ^/?(?:www\.)?example-01.nl [OR]
RewriteCond %{HTTP_HOST} ^/?(?:www\.)?example-02.de [OR]
RewriteCond %{HTTP_HOST} ^/?(?:www\.)?example-03.eu [OR]
RewriteCond %{HTTP_HOST} ^/?(?:www\.)?example-04.net [OR]
RewriteCond %{HTTP_HOST} ^/?(?:www\.)?example-05.org
RewriteRule ^(.*)$ http://www.example-new.com/$1 [R=301,L]
</IfModule>
I have tried every combination I could find to try and get this to work. What could be going wrong here?
Many Thanx!