• My one and only WordPress website
    http://www.henleyprobate.org.uk
    is a dry as dust CMS system of custom posts created with WP 3.8.1 and Advanced Custom Fields plugin keeping details of mainly C18th wills. Very happy with it, it does what it says on the tin.
    Needing to make a presentation in a hall with no internet access and having a laptop already set up with IIS, PHP and MySQL I installed WP 3.9.1 and after much reading of this forum, moved the WP database across, edited it and it now more or less works.
    The only problem seems to be that using a post id in a link appears not to work, producing a 404 error. I chose that way of linking because it is the most direct and simple way, supposed to work in all environments, and I do not see any advantage in pretty permalinks.
    On the remote website
    http://www.henleyprobate.org.uk the wills menu item produces a list of will titles linking to the wills. Look at the page source and you see that the link is written as: <p><a href="?p=801">801: William Alleway | 23 December 1734</a></p>
    but clicking on the link brings up the URL
    ‘www.henleyprobate.org.uk/?will=william-alleway-23-december-1734’
    so the id link has been magically replaced and works.
    On the laptop the numeric link gives a 404 error, but if I change the laptop script to:
    <p><a href="<?php echo get_permalink($id) ?>"><?php echo $id . ": " . $title ;?></a></p>
    the URL generated is:
    localhost/henleyprobate/?will=william-alleway-23-december-1734
    which brings up the required will.
    I do not really want to change all the scripts on the laptop and would prefer to keep them the same in both environments. Can this behaviour be explained?
    In both cases the permalink setting is the default, i.e. using the numeric post id form (?p = n).

  • The topic ‘permalink ?p=id not working with IIS’ is closed to new replies.