• Resolved KB

    (@hardaka)


    I tried what was in this thread but having problems.

    What I want to do is have my pages have their names in their URLs.

    No-> https://localhost/?page_id=6
    Yes-> https://localhost/pagename

    In Customize Permalink Structure, I found if I just change from default, I get what I want. I hover over a link or when I go to the page, the URL shows up for the page as https://localhost/index.php/pagename/.

    I’m happy with that, but no images load (they load for the main page though that is https://localhost/). I’m guessing maybe I need to get the index.php out of it? Haven’t been able too, unless that isn’t the problem.

    I am using WordPress 2.3, XAMPP Lite to build website on desktop, and an altered version of theme paalam-11.

    Any ideas on how to get the images to show up?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Probably; You need to reference your images absolutely, not relatively.

    Say your images are in the same folder as index.php –
    if your page is at /mypages/index.php?p=mypage and your images are referenced like this <img src=”myimg.jpg” /> then it works fine.

    If however you set the page url to be /mypermalinks/mypage- then those relative image src’s will point to /myperlalinks/mypage/myimg.jpg- and it’s not there! the htaccess file will point the 404 image to index.php?p=mypermalinks/mypage/myimg.jpg- and it’s not there either!

    Solution:
    Use absolute referecnes
    </p>
    That is, work out the absolute reference for your images (probably ‘/images/’ or ‘/wp-uploads/’ and not ‘images/’ or ‘wp-uploads’) and correct all your img tags.

    Thread Starter KB

    (@hardaka)

    Wow, I feel dumb.. I remember doing this a long time ago now with another website. Thank you for re-educating me!

    My code had been:

    <img src=”wp-content/uploads/image.jpg”>

    I switched it to:

    <img src=”/wp-content/uploads/image.jpg”>

    Now it works. Just a little slash needed. I won’t say how many hours I tried to figure that out, LOL.

    Thanks again. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to page name in Permalinks links, but images won’t load.’ is closed to new replies.