[wp-hackers] Enabling pretty url search redirect

Tom Barrett tcbarrett at gmail.com
Wed Nov 21 16:53:56 UTC 2012


Interesting!

@Alex briefly:
 - The 's' query var is used in a various places (eg admin search) so not a
trivial rewrite.
 - I prefer to let WordPress to work out what should happen (just like for
any other rewrite).
 - (I don't use apache ;p).

@Mike
Thanks. Mark uses template_redirect and has some other useful sanity checks
in there. It's the 3rd plugin I've found today that either does something I
was doing, or is doing something I want to. 'Mazing.

Still leaves me wondering why it isn't core behaviour. There are no
caveat's to Mark's code, and I only learnt about /search/ when I tried to
add it myself and found it already there. The lack of redirect made me
think that /search/ wasn't there. But it is.

Oh well, enough pondering. Thanks for help :)



On 21 November 2012 16:32, Mike Little <wordpress at zed1.com> wrote:

> On 21 November 2012 16:07, Tom Barrett <tcbarrett at gmail.com> wrote:
>
> > I want to redirect all front end searches (?s=) onto the /search/ pretty
> > permalink. For pages (?p=) this happens automatically when permalinks are
> > switched on, but search is different.
> >
> >
> Take a look at this plugin
> http://wordpress.org/extend/plugins/nice-search/
>
> Seems to work ok.
>
> Mike
> --
> Mike Little
> http://zed1.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
http://www.tcbarrett.com | http://gplus.to/tcbarrett |
http://twitter.com/tcbarrett


More information about the wp-hackers mailing list