| |
| |
301 non www to www redirect in Joomla
Go to your .htaccess file in joomla 1.5 if you are using sh404SEF component fo SEF Urls
Find the below line
#
# mod_rewrite in use
RewriteEngine On
and write the following code after RewriteEngine On according to your website name
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
So the full code look like:
#
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
Referred URL: http://www.webmasterworld.com/content_management/3971886.htm
And your website will redirect from http://mysite.com to http://www.mysite.com/
and here is my another research:
For Joomla 1.0
along with the above modification in the .htaccess file.
we need to modify the configration.php file also in the following line:
$mosConfig_live_site = 'http://www.mysite.com';
Remember to keep www (before sitename)
and Above code for perfect redirect i.e.
#
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
Thats All... |
|
|
|
|
 |
|