WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] redirects to page-1 (9 posts)

  1. everwill
    Member
    Posted 3 years ago #

    I'm having trouble finding help on this type of error because I'm not sure how to describe my problem. I'm integrating WP into my site and I've managed to do so successfully on a number of pages called listing-x.php, for example:

    http://www.condo-alexandria.com/listings-alexandria.php
    http://www.condo-alexandria.com/listings-cameron-station.php

    And a slew of similar pages work just fine.

    But when I put nearly identical code into a page called listings.php, on load the page resolved to a new page called "listings.php-1". Listings.php-1 is a 404-error. So I saved the same code to listings-working.php where it loads just fine. Then I tried to redirect listings.php to listings-working.php ... and it just won't redirect to the new page. Instead, it stubbornly resolves to listing.php-1.

    Any clue what the error is called so I can track down the problem.

  2. Samuel B
    moderator
    Posted 3 years ago #

    you may need to empty your trash as wp thinks there are 2 listings.php and is adding the -1 to differentiate

  3. everwill
    Member
    Posted 3 years ago #

    Great tip ...

    I wonder how to empty my trash?

    I have a managed server with Plesk on GoDaddy.

  4. everwill
    Member
    Posted 3 years ago #

    As far as I can tell the problem only occurs when I insert:

    <?php
    require('wp-blog-header.php');
    ?>
  5. everwill
    Member
    Posted 3 years ago #

    If you're talking about just emptying the trash in Posts and Pages, I've already done that.

  6. everwill
    Member
    Posted 3 years ago #

    Just for fun I created a file called listings.php-1 and uploaded that. It still shows as 404.

  7. everwill
    Member
    Posted 3 years ago #

    Any further suggestions?

  8. everwill
    Member
    Posted 3 years ago #

    Hmmm ... if I knew what to call this problem I might be able to search the forums for a solution.

  9. everwill
    Member
    Posted 3 years ago #

    Well, you pointed in the right direction in a way. WP did think there were 2 copies. Some way on another there were multiple redirects from listings.php to listings.php-1. I have no idea where they came from but I deleted them and all is well.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.