#1
  1. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Aug 2007
    Posts
    21
    Rep Power
    0

    Exclamation Non-www and www 301 permanent redirect issue....urgent


    Hello All,

    I have implemented 301 redirect on my site. I want to redirect http://abc.com.au to http://www.abc.com.au. My site is hosted on Apache server.

    I have created .htaccess file and uploaded it on root directory. When I try to open http://abc.com.au then it will redirect to http://http//www.abc.com.au (not working). I have placed below code on .htaccess file:-

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.abc\.com\.au [NC]
    RewriteRule (.*) http://www.abc.com.au/$1 [R=301,L]

    Note: Mode rewrite is enabled

    Any one please help me ASAP

    Thanks,
    SEO DNA
  2. #2
  3. Super Moderator
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Apr 2006
    Location
    I N D I A
    Posts
    4,141
    Rep Power
    1028
    Try this one:

    RewriteEngine On
    Rewritecond %{http_host} ^abc.com [nc]
    Rewriterule ^(.*)$ http://www.abc.com.au/$1 [r=301,L]

    Should work!

    SEO FAQs - You might find your answer here.
    SEOchat Forum Rules - Read Before You Post
  4. #3
  5. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Aug 2007
    Posts
    21
    Rep Power
    0
    Originally Posted by pro_seo
    Try this one:

    RewriteEngine On
    Rewritecond %{http_host} ^abc.com [nc]
    Rewriterule ^(.*)$ http://www.abc.com.au/$1 [r=301,L]

    Should work!
    Thanks for the reply.

    Please suggest me the reflection will come up with immediate effect after uploading the .htaccess file or it will take some time to see reflection?

    Thanks Again
  6. #4
  7. Super Moderator
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Apr 2006
    Location
    I N D I A
    Posts
    4,141
    Rep Power
    1028
    Ideally it should be immediate. However sometimes it seems to take a little longer for the redirect to reflect...dunno why
  8. #5
  9. Super Moderator
    SEO Chat Mastermind (5000+ posts)

    Join Date
    Mar 2004
    Location
    Gloucester (South West UK).
    Posts
    6,533
    Rep Power
    3522
    Originally Posted by pro_seo
    Try this one:

    RewriteEngine On
    Rewritecond %{http_host} ^abc.com [nc]
    Rewriterule ^(.*)$ http://www.abc.com.au/$1 [r=301,L]

    Should work!
    Shouldn't that be:

    RewriteEngine On
    Rewritecond %{http_host} ^abc.com.au [nc]
    Rewriterule ^(.*)$ http://www.abc.com.au/$1
    ??
    ClickyB
    "The quality of the visitor is more important than the volume..." (Egol 22nd Feb 2008)
    [New to SEO/SeoChat?] [Canonical Problems?] [Forum Rules & Posting Guidelines]
  10. #6
  11. Super Moderator
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Apr 2006
    Location
    I N D I A
    Posts
    4,141
    Rep Power
    1028
    Originally Posted by ClickyB
    Shouldn't that be:

    RewriteEngine On
    Rewritecond %{http_host} ^abc.com.au [nc]
    Rewriterule ^(.*)$ http://www.abc.com.au/$1
    ??
    Of course!

    I missed the .au...thanks for that

IMN logo majestic logo threadwatch logo seochat tools logo