Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I restrict a search to only certain subdirectories or documents?

0
Posted

How do I restrict a search to only certain subdirectories or documents?

0

That depends on whether you want to protect certain parts of your site from prying eyes, or just limit the scope of search results to certain relevant areas. For the latter, you just need to set the restrict or exclude input parameter in the search form. This can be done using hidden input fields containing preset values, text input fields, select lists, radio buttons or checkboxes, as you see fit. If you use select lists, you can propagate the choices to select lists in the follow-up search forms using the build_select_lists configuration attribute. If you wish to keep secure and non-secure areas on your site separate, and avoid having unauthorized users seeing documents from secure areas in their search results, that takes a bit more effort. You certainly can’t rely on the restrict and exclude parameters, or even the config parameter, as any parameter in a search form can also be overridden by the user in a URL with CGI parameters. The safest option would be to host the secure and no

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.