If you type your domain without 'www' in

address bar, then is it go to your domain? or give error?
Lets try this to solve that problem..
Give your thoughts in comments..
It can be done bu .htaccess

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

回答の条件
  • 1人5回まで
  • 登録:
  • 終了:2013/12/24 13:15:06

回答0件)

回答はまだありません

  • id:rouge_2008
    This question is in violation of the guidelines.
    Answer to the request, such as posting to other sites and e-mail are not allowed.
    Please use it after reading and understanding the terms and conditions and guidelines.

    ・人力検索はてな利用ガイドライン (Jinrikikensaku-Hatena use guidelines) - Japanese
    http://q.hatena.ne.jp/help/guideline

    ·はてな利用規約 (Terms of Use Hatena) - Japanese
    http://www.hatena.ne.jp/rule/rule

    Please Cancel this question.
  • id:rouge_2008
    Here is the Q&A service.
    Post content that is not the question is not allowed.
    Please post about how to solve a problem in your own website or blog.

    Please post to this site if you have any questions or trouble.
    Induction to the site is not allowed.
  • id:psne
    <Files ~ "^\.(htaccess|htpasswd)$">
    deny from all
    </Files>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.example\.com)(:80)? [NC]
    RewriteRule ^(.*) http://example.com/$1 [R=301,L]
    order deny,allow

    # e.g. example.com
  • id:rouge_2008
    wwwなしでアクセスした時にエラーにならないようにwwwつきのURLにリダイレクトさせる為の方法を書いているだけで、質問ではないと思いますが・・・
    何も対策しない場合に次の状態になる人への解決策を提示しているだけだと思います。

    wwwつき・・・正常アクセス
    wwwなし・・・エラー
  • id:psne
    おっと、そうでしたか。

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません