Forums

[resolved] http://example.com vs www.example.com (7 posts)

  1. schweigenthaler
    Member
    Posted 2 years ago #

    My default WordPress addresses are http://example.com
    Unfortunately Firefox has begun to insert wwww (making http://www.example.com the address). I have a temporary workaround for me, but obviously this is going to happen to other Firefox users. Does anyone know of a way to get http://www.example.com to resolve to http://example.com ?
    second question: can wordpress be installed with address http://www.example.com

    thank you.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Add to your .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.example\.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    </IfModule>
  3. Sarah
    Member
    Posted 2 years ago #

    Hi i am looking for the same problem but the above code mention does not work. please help me out i want change my domain name from http://a2zarticlesbox.com to http://www.a2zarticlesbox.com

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That's because you're looking for exactly the opposite. Try:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
    </IfModule>
  5. Sarah
    Member
    Posted 2 years ago #

    Thanks, And my site can't open from mobile browers however my site supports mobiles. it shows reply sized is zero squid etc.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That's nothing to do with .htaccess. Please post a new topic.

  7. schweigenthaler
    Member
    Posted 1 year ago #

    Thank you very much.

Topic Closed

This topic has been closed to new replies.

About this Topic