Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2007
    Posts
    68

    domain name converts into an IP

    Hi Friends,
    I have a website and i wanted to change the homepage for it. I had this in my .htaccess file:

    redirect index.php http://www.mysite.com/vba/cmps_index.php

    Now, i installed wordpress and i changed the line in .htaccess file to:
    redirect index.php http://www.mysite.com/wp/

    And all of a sudden the domain name on the homepage is converting into the IP address.

    To try click this link http://www.cricfever.com and you will see it converts into a IP.
    But if i click the "forum" link ( existed from old site) it starts working fine.

    I have reverse DNS entries setup and everything was working fine until this change, so can someone please help me out...

    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,722
    It seems your entry in .htaccess
    redirect index.php http://www.mysite.com/wp/

    Is also effective on index.php in folder "wp" and at http://www.cricfever.com/forum/links/index.php so see if some other .htaccess file in those folders is clashing with the .htaccess file in the top level folder.
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  3. #3
    Join Date
    Jul 2007
    Posts
    68
    Thanks Vinsar,
    I checked but there are no .htaccess files under the /wp folder..

    Any other suggestions....

  4. #4
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Check if the software configuration file has got the site url as IP.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  5. #5
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,722
    It seems there are some more entries in your .htaccess file as I just experienced that your 404 pages also redirect to the IP.

    can you provide some more information about your server, OS, versions, control panel etc.

    If possible post here the entire code you have in your .htaccess file.
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  6. #6
    Join Date
    Oct 2007
    Location
    Kochi,INDIA
    Posts
    331
    I think you have setup your WP using the IP. So it goes into the database

    Take a dump of your database

    mysqldump dbname > dbname.sql

    and replace all instance of the IP address with the hostname with sed -i s/<ip>/<hostname>/g dbname.sql

    or you can use %S/<ip>/<hostname>/g in vi editor

    Drop the database; recreate it and restore the dump.
    http://xtendweb.gnusys.net/
    Plug in Nginx & Plug in performance on cPanel systems
    WebOps on cPanel . Deploy webapps to multiple servers and scale horizontally

  7. #7
    Goto the wp-admin page and modify the values "WordPress address (URL)" and "Blog address (URL)" under 'General Settings' to match your domain name.

  8. #8
    Join Date
    Jul 2007
    Posts
    68
    Thanks 227,
    You were right on spot. That was the place where the IPs were sitting instead of the domain name.

    Changing them made everything work fine.

    Thanks a lot guys

    Guys, can i ask one small thing more here if you don't mind:

    I have 2 folders under my root "wordpress" for wordpress and "forum" for vbulletin forum.I have made the domain point to the root folder and then in the root folder placed a ".htaccess" file to redirect index.php to the wordpress/index.php.

    I was wondering can i make the domain name point directly to the wordpress index.php file??? But i am worried, then how would it pick up the "forum" folder as that resides on the same level as "wordpress".

    Thanks
    Last edited by mickscool; 05-24-2008 at 12:46 AM.

  9. #9
    Join Date
    Oct 2007
    Location
    Kochi,INDIA
    Posts
    331
    Yes you can do that by changing the DocumentRoot for your website to point to the wordpress

    For the forum then you can define a seperate virtualhost entry with ServerName forum.mysite.com and setting its DocumentRoot to the forum folder
    http://xtendweb.gnusys.net/
    Plug in Nginx & Plug in performance on cPanel systems
    WebOps on cPanel . Deploy webapps to multiple servers and scale horizontally

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •