Support » Fixing WordPress » search clean url – no ?s=

Viewing 15 replies - 1 through 15 (of 18 total)
  • I just did a search on your site and it brings up the clean urls?

    are you sure, a search url is still ….com/?s=searchterm

    Oooh, I thought you meant the urls on the results list. Yeah the url of the search page is the s=…

    i thought that was clear 😉

    yeah, now that i read it again… 🙂 Sorry! No more helping until the coffee kicks in….

    “somefool”: Any hints on your process for linking to /search/keyword with WP1.5? Did you need to create a page with “search” as the slug?

    Disregard my question above. I think what “somefool” is referring to is that you can type an url such as “” manually and it’s a clean working url but if you use the search form it still spits out an “index.php?s=keyword”.

    The only thing I can think of is pointing the search form to an interim PHP page which captures the keyword(s) and redirects to an appropriately formed clean url.

    This came up in a Hackers list thread a few months back:

    Okay I just tried this…

    I made a new PHP file that just had this in it:

    <?php header("Location:".$s); ?>

    Then I just set the search form action to point to the new PHP file. I’m not a programmer by any means but that seems to work.

    Ok, cheers Davin Ill give that a try.

    I did think my question was clear, but obviously I was wrong 😉

    Hmm, Ok, what am I doing wrong?

    Bearing in mind that Ive got livesearch on my site, heres what Ive done. I removed the name=”s” attribute which seems to make it go to ?s=

    Now it just bounces on to it doesnt seem to bring the search terms with it

    <form style=”float:left; padding:0px;” onsubmit=”return liveSearchSubmit()” id=”searchform” name=”searchform” method=”get” action=”<?php bloginfo(‘url’); ?>/search.php” autocomplete=”off”>
    <input style=”width:170px;” type=”search” results=”5″ autosave=”ssave” id=”livesearch” value=”Search” size=”20″ onkeypress=”liveSearchStart()” onblur=”setTimeout(‘closeResults()’,2000); if (this.value == ”) {this.value = ‘Search’;}” onfocus=”if (this.value == ‘search blog archives’) {this.value = ”;}” class=”inputboxes” />
    <input type=”submit” id=”searchsubmit” style=”display: none;” value=”Search” />
    <div id=”LSResult” style=”display: none;”><div id=”LSShadow”></div></div>

    oops, scrattch that, it needs the name=”s” and works fine 🙂

    cheers guys ;-D

    If someone knows where best to place it, Ill stick this on the codex – when it works again

    So, anyone any ideas where best to add this to the codex?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘search clean url – no ?s=’ is closed to new replies.