Masalah no-www domain.com VS www.domain.com

Sebentar tadi baru aku perasaan d’mana website aku tak leh masuk tanpa ‘www’ di depannya. Maknanya kalau masuk guna www.syafiq.org boleh tapi kalau syafiq.org, keluar notice error ape tah. Setelah penat soal jawab dengan Pakcik Google barulah jumpa jalan penyelesaian.

Kepada sapa2 yang ada masalah domain sama macam aku ni, ni ha dah ada jalan..
Buat satu file .htaccess ,pastu masukkan input ni dalam tu..contoh:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^syafiq.org [nc]
rewriterule ^(.*)$ http://www.syafiq.org/$1 [r=301,nc]

Lepas tu, upload guna FTP ke File Manager ke apa dalam hosting website di dalam folder public_html …pastu tengok la keberkesanannya…

Guna dengan risiko anda sendiri ok. Aku tak bertanggungjawab.
Ni aku dah sediakan .htaccess untuk sesapa yang ‘rajin’, download dan edit la sendiri ek.

Nah amek dload
.htaccess

This entry was posted on Monday, May 26th, 2008 and is filed under Blog & Web. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “Masalah no-www domain.com VS www.domain.com”

  1. Mohd Ismail

    aku prefer ade http://www.. he he.. sbb nampak klasik & kool.. =) xde www mcm janggal sikit la walaupun org kata menyemak je..

  2. PeCo

    MohdIsmail:
    sstgh hosting yg aku guna sblom ni, no-www ngn www adlh page yg berlainan..

  3. nuarX

    tapi yang aku belajar kan…w3 punya company da neglect da simbol www tu. sebab dieorang assume sume orang tau maksud www tu….tapi tak tau la nape ko boleh jumpe website lain kalau tak letak www kat url.

  4. PeCo

    nuarX:
    bkn jmpa web lain, tp page yg x wujud dlm hosting kita juga.
    aku dh check kt google, and bnyk dpt result utk setel mslah aku tu
    aku pun tak berapa phm lg mslh ni :?

Leave a Reply