[wp-hackers] Rewriting search URL
Peak Discharge
chmoka at gmail.com
Sat Apr 23 22:26:37 GMT 2005
Not working, I don't even know where get_bloginfo and wp_redirect come from.
On 4/22/05, Mark Jaquith <mark.wordpress at txfx.net> wrote:
>
> Peak Discharge wrote:
>
> That changes my url into the form of http://www.unicorns.com/?s=string,
> which is a progress. The aim, however is to change all search urls to
> http://www.unicorns.com/search/string
>
>
> How about this? Seems to work for me.
>
> <?php
>
> if ($_REQUEST['s'] && strpos($_SERVER['REQUEST_URI'], '/search/') ===
> FALSE ) {
> $redirect_to = get_bloginfo('home') . '/search/' . $_REQUEST['s'];
> wp_redirect($redirect_to);
> exit();
> }
>
> ?>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>
--
best regards, chmoka
mailto:chmoka at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050423/dccb0aba/attachment.html
More information about the wp-hackers
mailing list