WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pages and Permalinks problem (2 posts)

  1. tkm
    Member
    Posted 5 years ago #

    Hi all,

    I'm near to completing my wordpress website and I'm changing the permalinks to a custom structure. I'm first doing this on a local copy of the site and I have an Xampp set-up. I know that in order to make Xampp work with permalinks you first have to do the following:

    1. Remove the hash from the link #LoadModule rewrite_module modules/mod_rewrite.so in the httpd.conf file

    2. Change AllowOverride None to AllowOverride All in the same file

    When I then change to a custom permalink structure the blog posts work absolutely fine. However, the static pages do a curious thing; from the home page I can click on any static page (e.g. faqs, contact us, etc) and the permalink works fine. However, when I then attempt to click away from the static page, every link has the current page's name inserted in the URL.

    For example if I click on "contact us" from the home page the first link will be as follows: http://www.example.com/contact-us. This is correct. Then from the "contact us" page if I go to click on "FAQs" the faqs link will look as follows: http://www.example.com/contact-us/faqs. This is obviously incorrect.

    Sorry for the long message, but it's a tricky one to explain. Any help would be greatly appreciated!

    Thanks,
    tkm

  2. tkm
    Member
    Posted 5 years ago #

    I resolved this! Woooo! The problem was that I had many absolute references to pages (e.g. https://www.example.com). I changed these to use the <?php bloginfo('wpurl'); ?> call and that seems to have fixed the problem.

    Shouldn't really use absolute references as they cause various issues when looking at a local copy of your website.

    Ok thanks,
    bye.

Topic Closed

This topic has been closed to new replies.

About this Topic