Forums

Links to old permalink structure don't redirect with wp-404-handler (3 posts)

  1. NativePaul
    Member
    Posted 2 years ago #

    I'm using the wp-404-handler.php method to get pretty permalinks for my site.

    I recently changed the permalink structure from /%post_id%/%postname%/ to /%year%/%monthnum%/%postname%/

    The problem is that a lot of links on external sites use the old structure which returns a 404 page. Changing the permalink structure on a local testing server using WAMP didn't do any damage at all.

    http://www.nativenoise.co.za/820/the-winter-olympics-bebop-rocksteady/
    would intelligently redirect to
    http://www.nativenoise.co.za/2009/08/the-winter-olympics-bebop-rocksteady/

    Is there any way to do that using the wp-404-handler.php method on a windows server?

    This is the code in my wp-404-handler.php file:

    <?php
    $_SERVER['REQUEST_URI'] = substr($_SERVER['QUERY_STRING'], strpos($_SERVER['QUERY_STRING'], ':80')+3);
    $_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
    include('index.php');
    ?>
  2. orhanozcan
    Member
    Posted 2 years ago #

    I resolved this problem. Look at my other post.
    http://wordpress.org/support/topic/255815

  3. NativePaul
    Member
    Posted 2 years ago #

    Thanks orhanozcan.
    I eventually moved my site to linux server and enabled WordPress permalinks without the need for the wp-040-handler.php

    Thank you for the response, hopefully it will help a few people.

Topic Closed

This topic has been closed to new replies.

About this Topic