Search code examples
concrete5

Concrete 5 Domain change


I changed the domain of a concrete 5 website according to this documentation

All I did was adding this code to config/site.php

define('BASE_URL', 'http://www.domain.co');
define('DIR_REL', '');

The domain was changed from the server side & the homepage works fine. But when I clicking a link, say navigate to the about us page, the site generates a really long URL with 20 forward slashes.

ex: http://www.domain.co/////////////////////about/

When I reload the page, another 20 appears

ex: http://www.domain.co/////////////////////////////////////////about/

This happens with any link on the homepage & in Chrome shows a browser error "ERR_TOO_MANY_REDIRECTS".

The htaccess seems normal to me.

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --

Any concrete5 experts who can explain what needs to be done?

Thanks heaps!


Solution

  • Remove extra slashes because each backslash a new redirection.

    Removing trailing slash

    RewriteRule ^(.*)/$ /$1 [L,R]