Forums

Problem with relative links on local install after move from online hosting... (1 post)

  1. MikeTheVike
    Member
    Posted 2 years ago #

    I have a site that is hosted online using WP 2.3.1. It use a lot of relative links and works fine. For example, the css files all have links to images like this "/img/image.jpg" This works fine because I don't have any dynamic urls..all the pages on the site are WP "pages" and all have a url similar to this"http://www.mysite.com/?page_id=23"

    I just moved the whole site to a local install "http://localhost:8888/wordpress28" and upgraded it to WP 2.8. It worked, but none of the css images were displaying. When I changed the paths to absolute in the css files it worked. All my pages were linked relatively "/?page_id='33'" and this worked fine when online. Now when I click on a page link, it tries to find the page at "http://www.localhost:8888/?page_id='33'" instead of "http://www.localhost:8888/wordpress28/?page_id='33'" is there a reason for this, a setting I missed in a config file possibly?

    I know relative links are a big nono, but I didn't build this site originally, just maintaining it now. In the future , what steps do I need to take to bring the links up to standard? I assume search and replace every link with a absolute link? Anything else? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.