Hello,
I was spending 3 hours searching in Google and doesn't find anything that can solve my problem. Can anyone help? Thanks in advanced.
I am trying to setting up the 301 redirect for my Joomla site.
It is installed in the subdirectory as below:
http://www.mydomain.com/joomla
When somebody type in http://mydomain.com/joomla, i want it to be http://www.mydomain.com/joomla (From non-www to www to avoid canonical issue)
But I couldn't get .htaccess code to work properly in subdirectory, I use the same .htaccess code below in the main domain and it work like charm?
Here is my code in .htacess:
########## Begin - Redirecting non-www request to www
#
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule (.*) http://www.mydomain.com.my/$1 [L,R=301]
#
########## End - Redirecting non-www request to wwwthe
What should I do? Thanks & regards