Search URL

Bruce Dubbs bruce.dubbs at gmail.com
Wed Feb 28 23:09:36 PST 2007


Dan Nicholson wrote:
> On 2/1/07, Randy McMurchy <lfs-user at mcmurchy.com> wrote:
>> There are places in the BLFS book which say to go to
>> http://search.linuxfromscratch.org/ if you need to search the mail
>> archives. This URL only leads one to a page that says: "It works!".
>>
>> It doesn't seem very useful. Is search broken right now, or does the
>> URL in the book need to be fixed?
> 
> While we have people's attention, the above situation still stands.
> Someone want to look into it? I have novice level apache/web skills at
> best.

OK, this is what was happening.  search.linuxfromscratch.org has been
commented out in the apache config, so the virtual server was just going
to the root directory of the server with a single index.html:

/srv/www/htdocs]$ cat index.html
<html><body><h1>It works!</h1></body></html>

I added a default virtual server to httpd.conf:

<VirtualHost _default_:*>
    DocumentRoot /srv/www/www.linuxfromscratch.org
    RewriteEngine On
    RewriteRule ^/.* /srv/www/www.linuxfromscratch.org/search.html
</VirtualHost>

This kinda works, but not completely the way I want it to.

search.linuxfromscratch.org is in the dns, but is not a virtual server.
 Apache goes to the default.

Right now it is redirecting search.linuxfromscratch.org to the right
page (I think).  I was playing with the Rewrite rule and my system may
think its a permanent redirect.  I'm not sure how that is supposed to work.

In any case, search.linuxfromscratch.org/something-or-other goes to the
base site not search.html.  I'm not sure how if this is right or not,
but at least it get the search url to something where the users can
click on a google search.

Any insights into how to get the Rewrite to work as intended is welcome.

  -- Bruce



More information about the website mailing list