0

I am using Typo3 with RealUrl and theres following i want: foo.domain.com should redirect to www.otherdomain.com

I tried it with domain records in Typo3 (theres a redirect option) and .htaccess stuff but nothing seems to work.

Every prefix i try foo.domain.com or bar.domain.com redirects me to domain.com

Any ideas?

Heres the .htaccess in case you want to take a look:

RewriteEngine On

RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]

RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]
ggzone
  • 3,661
  • 8
  • 36
  • 59

1 Answers1

2
RewriteEngine On
RewriteCond %{HTTP_HOST} ^bli.bla\.com$ [NC]
RewriteRule ^(.*)$ http://bla.bli.com/$1 [R=301,L]

or

RewriteCond %{HTTP_HOST} ^www1.bla.com$
RewriteRule (.*)$ http://www5.bla.com/$1 [R=301,L]

This example works 100% if implementet right. (TYPO3 .htaccess: "# Add your own rules here.") Maybe you should delete Cooluri or Realurl Cached links.

ms as
  • 126
  • 3
  • doesnt work (maybe becouse of realurl?) bli.bla.com redirects me to bla.com instead bla.bli.com – ggzone Jul 05 '13 at 10:38
  • Please, use the code formatting. Your answer is currently really hard to read. – tmt Jul 05 '13 at 10:46
  • there are no cached realUrl pathes for the page where the wrong redirect happens also for the destination. tried both of your snippets after the "# Add your own rules here." line. :( still the same problem. – ggzone Jul 05 '13 at 13:25
  • add it right after RewriteEngine On. This has nothing to do with RealURL, not even with TYPO3 - it's just .htaccess business – Urs Jul 05 '13 at 20:15
  • i accept this as answer.. the problem was another file which overwrites my RewriteRules -.- – ggzone Jul 18 '13 at 14:23