Forums

Search result URL always shows ?s= (3 posts)

  1. Eagle
    Member
    Posted 3 years ago #

    Hi there,

    I'm experiencing a strange issue since some time which I thought to be plugin-related, but finally figured out that it's not (because I ran a test with _all_ plugins disabled).

    My permalink-structure is http://www.example.net/2008/12/24/sample-post/ and this works very well.
    However, whenever somebody uses the search-box, the search result URL will be http://www.example.net/?s=test - and since cruftless_searching doesn't work with newer WordPress versions (at least not for me which maybe means other plugins are blocking it), this issue isn't fixable for me any more.

    So, if somebody knows a workaround or a solution: please, share your knowledge and wisdom with me! Please! :)

    Best regards & merry Xmas,
    Martin

  2. Len
    Member
    Posted 3 years ago #

    That's the default action of a search result even when using so-called pretty permalinks. You can change it however - I did on my own blog.

    First, create a new file called search.php containing the following...

    <?php header('Location: http://www.yoursite.com/search/' . $_GET['s']); ?>

    ...and upload it to root.

    Next, look for the searchform in your theme and change the action to...

    action="<?php bloginfo('url'); ?>/search.php"

    The end result will be yoursite.com/search/SEARCHTERMS instead of yoursite.com/?s=SEARCHTERMS

  3. ponc0
    Member
    Posted 2 years ago #

    can you tell me more .. about that ? for example yoursite.com/search/SEARCHTERMS will change yoursite.com/informations/SEARCHTERMS ? can i do for it ? Thanks friend

Topic Closed

This topic has been closed to new replies.

About this Topic