Forum Moderators: phranque
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^pref\.example\.com$ [NC]
RewriteRule ^(.*)$ http://pref.another.domain.com/$1 [L,R=301]
.... http://pref.example.com I am redirected to: http://pref.another.domain.com/pref/ http://pref.another.domain.com http://pref.another.domain.com/pref/login.php
GET /pref/login.php HTTP/1.1
Host: another.domain.com
.....
..... http://pref.example.com/login.php http://pref.another.domain.com/pref/login.php /pref/ suffix is coming from. I managed with this by just copying all files to /pref/ directory in my site root and now the site works, but the /pref/ suffix shouldn't be added automatically by Apache.