[dokuwiki] Re: Partial Search by default

  • From: "Heiko Barth" <dw-mailinglist@xxxxxxxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Sun, 26 Aug 2012 19:34:28 +0200

Hi everyone,
I am not sure if this has already been discussed somewhere but... would there be an easy way to have partial search activated by default in Dokuwiki? Taking the search term and adding a * before and after with a mask perhaps or is there a cleverer way?
Cheers, Andy

If you are using mod_rewrite you can add the following to your .htaccess file:

# Force partial search
RewriteCond %{QUERY_STRING}     ^do=search&id=([a-zA-Z]+)(&.*)?$
RewriteRule .*                  %{REQUEST_URI}?do=search&id=*%1*%2 [L]

I hope this can help you.

Heiko
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: