Different result while accessing my site

Discussion in 'Site & Server Administration' started by init2, Mar 22, 2009.

  1. #1
    Hello All,

    I purchased a new domain ex:xyz.com & a hosting account on webhostingpad

    and installed Wordpress via fantastico on that

    now when i am trying to browse the website via

    1) http:\\xyz.com --- i am getting my first welcome page of wordpress

    but when i am trying to browse via

    2) http:\\www.xyz.com ---> i am getting my webhostingpad default page


    is anything wrong i have done while doing installation with fantastico or any changes are missing .


    Please advice

    Thanks in advance
    init2
     
    init2, Mar 22, 2009 IP
  2. FreedomOverdose

    FreedomOverdose Well-Known Member

    Messages:
    172
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #2
    The same thing happened to me when I set up my first site. You just have to play a bit with htaccess to redirect all www requests to the wothout www url, or vice versa ;). Just google the issue and you'll find the htaccess code ;)
    Cheers!
     
    FreedomOverdose, Mar 22, 2009 IP
  3. init2

    init2 Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the hint

    will try searching right now
     
    init2, Mar 22, 2009 IP
  4. init2

    init2 Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4

    Hello Freedom,

    i searched on this and got the belwo to put in .htaccess file

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


    little confused that it has to be placed in .htaccess file which is under public_html or www directory?

    kindly advice

    Regards,
    init2
     
    init2, Mar 22, 2009 IP