Specific site search form

Maljonic

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,297
Can someone tell me how to word the code for a search form that only searches specific pages?

I guess (hoping) I can just write this line differently: <input type="hidden" name="basehref" value="http://maljonicsdreams.com"> so it only searches the pages I want it to instead of the whole site; say. 'http://maljonicsdreams.com/links.htm, http://maljonicsdreams.com/links2.htm, http://maljonicsdreams.com/links3.htm' or something like that? :)
 

Shovel

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,350
It would depend entirely on the search script you're using sadly. The "basehref" input you quote above is just a variable name and means nothing outside the context of the script.

You'll need to read the documentation for the script itself I'm afraid. A workaround might be to place all the files you want to search within a subdirectory (say /links/links1.htm, etc) and then set that <input> to:
Code:
<input type="hidden" name="basehref" value="http://maljonicsdreams.com/links/">

That may or may not need a trailing "/", try without if that fails.

Beyond that, and if the script you use doesn't offer anything in the way of documentation, you might have to find a new script.
 

Maljonic

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,297
I tried that, but it searched everything else on my site after what I specified; just searched that bit first I think. :)
 

Shovel

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,350
It definately sounds like you need a more powerful search script then.
 

Maljonic

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,297
Okay, I'll ask my hosts and see what they say. :)
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
Silly thought - how about using Google, but limiting it to your site - you can even use the Google API rather than redirecting to google.com... it's all documented too :)
 

Users who are viewing this thread

Top Bottom