I have Joomla installed on root folder and another Joomla installed on a subfolder.
I want to redirect www
to no-www
in subfolder by this code in blog .htaccess:
RewriteCond %{HTTP_HOST} ^(www\.example\.com)?$
RewriteRule ^(.*)$ http://example.com/blog/$2 [R=301,L]
It worked for root redirect but when I want browse internal page it redirect the page to home page.
$2
in place of$1