1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WP Search Result Permalink need advice

Discussion in 'Blogging' started by richim1, Mar 6, 2011.

  1. richim1

    richim1 Guest

    Hello guys...
    I use %postname% on post permalink, so it looks like :
    How can i change my search result permalink :
    to
    ("/search/" deleted)
    Without crash with post permalink...

    Any suggest?
     
  2. SpiderWebMaster

    SpiderWebMaster Power Member

    Joined:
    Jan 24, 2009
    Messages:
    617
    Likes Received:
    519
    Occupation:
    I don't have a job...
    Location:
    /dev/null
    You can't...
     
  3. richim1

    richim1 Guest

    But i find a blog with permalink as described above...
     
  4. SpiderWebMaster

    SpiderWebMaster Power Member

    Joined:
    Jan 24, 2009
    Messages:
    617
    Likes Received:
    519
    Occupation:
    I don't have a job...
    Location:
    /dev/null
    There you have it, problem solved.
    Contact the owner of that site and ask him.
    Oh, and if the guy tells you, please3 tell me how it's done... i would also like to know. ;)
     
  5. athuk

    athuk Newbie

    Joined:
    Nov 25, 2009
    Messages:
    12
    Likes Received:
    1
    It using 404.php on your theme folder.
    You need to edit the 404.php file so can show everything you want to show lol
    I using this on my custom se with wordpress.
     
  6. SpiderWebMaster

    SpiderWebMaster Power Member

    Joined:
    Jan 24, 2009
    Messages:
    617
    Likes Received:
    519
    Occupation:
    I don't have a job...
    Location:
    /dev/null
    Wouldn't that be like... useless?
    If you send a 404 to present the 404 page then search engines will also get a 404 and they won't index the page, so, no gain.
    Unless i'm completely wrong and the 404 page doesn't send a 404 error and can be indexed.

    I think you have to go a little deeper on the explanation.
     
  7. timchuks87

    timchuks87 Junior Member

    Joined:
    Jul 9, 2010
    Messages:
    172
    Likes Received:
    70
    Occupation:
    What the Heck do you think? SMH
    Location:
    In your Head!
    What u need that for?
     
  8. richim1

    richim1 Guest

    Can u tell me how...?
     
  9. athuk

    athuk Newbie

    Joined:
    Nov 25, 2009
    Messages:
    12
    Likes Received:
    1
    OP:
    I just online tru phone and I can't send a pm.
    You can find permalink for search and remove it on wp-includes/rewrite.php
    find "search" and delete it.

    Try at your own risk.

    See pdfboox.com
    click on 1 link of recent searches then click 1 of result. As you can see, this is 404.php and indexed.
    The bad things I can't post article on it.
     
  10. richim1

    richim1 Guest

    Yes, i did...
    I was delete "search" on rewrite.php , but as i mention above...when i create blog post, it will be search result. Blog post doesn't appear.
    So how can i split between blog post and search result on the same permalink?
    pdfboox.com is pure SEARCH, there is no has content.
     
    Last edited by a moderator: Mar 8, 2011
  11. SpiderWebMaster

    SpiderWebMaster Power Member

    Joined:
    Jan 24, 2009
    Messages:
    617
    Likes Received:
    519
    Occupation:
    I don't have a job...
    Location:
    /dev/null
    i told you... you cant't do that.
    Wordpress needs the /search/ slug so it can rewrite the URL to ?s=
    If you take that out it will just look for a post with that permalink and if nothing found it will return a 404.
    This won't work in a normal blog for sure.
    In fact i even advise you to keep the post id in your pretty permalinks as it speeds up the retrieval of the posts from the database, like /%id%-%postname%/
    maybe if you use these kind of permalinks you can do that hack, but i doubt it.
    Consider yourself lucky for the search url using /search/ now instead of the ?s= it used some months ago...
    Why don't you ask the same question in the wordpress support forums? They will have a definitive answer for you for sure ;)
     
  12. athuk

    athuk Newbie

    Joined:
    Nov 25, 2009
    Messages:
    12
    Likes Received:
    1
    I see giftawayoftheday can split it, between post and search result, but I don't know how their programer doing this.
    I think it using if condition(I don't know the actual name for this php code) can split it.
    If you have money, get a freelancer is the best way. You may also ask wordpress support to help or giving an example to split them though it hard to learn as said by SpiderWebMaster.
     
  13. richim1

    richim1 Guest

    Ok, thanks for the advice mate...