Support » Fixing WordPress » Search results redirect to home page

  • We did a full site backup of one of our sites and restored it into a backup directory which looks identical to the original site.

    We noticed that when we do a search (on the backup site) and the search results exceed one page the first page of results displays correctly but when clicking on the link to retrieve the second page, instead of displaying the second results page it redirects to the home page, yet the page address displays correctly.

    First page of results shows as this: and returns the results correctly

    clicking on the retrieval of the second page of results shows this: but displays the home page of the site.

    (note we just changed our actual domain name to oursite)

    The strange thing is that the permalinks are set by Post Name when it doesn’t work. If we change the permalinks to the Default setting then the search works correctly when retreivieng multiple pages of search results.

    We have seen multiple posts about this issue in the forum dating back several years but none seem to have an actual solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • one more thing. the search code we use in the sidebar is

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <input type="text" size="15" value="<?php the_search_query(); ?>" name="s" id="s" />

    Just tried to play around with the permalinks again and the search only works when set to the Default setting. 2nd page search results do not work correctly when using the Day and Name, Month and Name, Numeric and Post Name settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search results redirect to home page’ is closed to new replies.