Pretty URL code prevents domain redirect

Permalink
Hi all,

I switched the main domain of the Concrete5 installation and now I got a problem with my deeplinks.

In my .htaccess I'm using:
RewriteCond %{HTTP_HOST} ^old-domain.de$ [OR]
RewriteCond %{HTTP_HOST} ^www.old-domain.de$
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]

to redirect to the new domain.

It seems that the pretty url code
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]

prevents the correct redirect to the new domain.

For example, when I'm trying a deeplink with the old domain:
http://www.old-domain.com/category/subcategory

it always redirects to
http://www.new-domain.com/index.php

because of the pretty url code.

When I switch off the pretty URLs it works without any problems:
http://www.old-domain.com/index.php/category/subcategory

redirects to
http://www.new-domain.com/index.php/category/subcategory


Does anybody have a solution for this?

Thank you very much
Markus

 
mwindisch replied on at Permalink Reply
Got it, Concrete5 provides a solution for this. I just had to add
define("URL_REWRITING_ALL", true);
define('BASE_URL', 'http://www.new-domain.com');

to my config/site.php. :)