How to redirect the non-www address to the www in Joomla

Posted on Posted in 301 redirects

How to redirect the non-www address to the www in Joomla

azluxurylawns.com
http://www.azluxurylawns.com
http://www.azluxurylawns.com/home
http://www.azluxurylawns.com/index.php

In order to redirect /home and /index.php to the root and return all non www addresses to www, I added the following to my .htaccess in the root of the /public folder

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
#  mod_rewrite in use
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ http://www.azluxurylawns.com/ [R=301,L]
Rewritecond %{http_host} ^azluxurylawns.com [nc]
Rewriterule ^(.*)$ http://www.azluxurylawns.com/$1 [r=301,nc]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /home HTTP/
RewriteRule ^index.php$ http://www.azluxurylawns.com/ [R=301,L]

Srinivas Katam

Do you need help growing your business? Srinivas Katam is a Digital Marketing Strategist and Consultant with over 200 successful SEO and Social Media client engagements completed. I’ve worked with brands across the world as a digital marketing consultant to deliver revenue growth from content-focused inbound marketing campaigns. He has been partnering with companies like yours for more than 13+ years to provide more traffic with better results. He is an Innovative Marketer who specializes in digital marketing, specifically in social media, SEO and online strategy.

More Posts - Website

Follow Me:
TwitterFacebookLinkedInPinterestGoogle PlusDiggStumbleUponYouTubeRedditDelicious

Leave a Reply

Your email address will not be published. Required fields are marked *