Search code examples
.htaccesshttp-redirectjoomlasef

Force www with SEF doesn´t work in Joomla 3


When I force redirection from no-www to www (using htaccess) works fine only with the domain.

domain.com (redirect to) → www.domain.com (works fine)

domain.com/category/article/ (redirect to) → www.domain.com/index.php (doesn't work)

First redirects correctly to www.domain.com/category/article/ ( I can view in the browser) and then quickly change to www.domain.com/index.php.

  • I used a lot of options in htaccess for redirect domain to www. but nothing works.
  • I disable redirection plugin in Joomla.
  • If I disable SEF in admin Joomla. Works. With non SEF url works fine.
  • In the same server in another website with Joomla 2.5 works fine.

Any idea Please?


Solution

  • I believe you have the www redirect in the wrong place in the htaccess file. Here is my boilerplate htaccess I use as a starting point for all Joomla sites on Apache. I've added it to pastebin as the editor here messes with formatting.

    http://pastebin.com/yW9r8FQL