Relative Site Indexing

richlivi
Posts: 2
Joined: Thu Jun 21, 2001 6:36 pm

Relative Site Indexing

Post by richlivi »

I'm wondering if anyone knows of a way to perform a "relative" index of a web site? In other words, rather than indexing the site by specifying the fully qualified URL (e.g. http://www.yahoo.com), is there a way to specify a directory that I want to index on the machine from which webinator is running?

So, I would like to say specify the HTML root on my web server, and perform the index there. Theoretically, this should work, because all of my page links are relative (e.g. <a href="/dir_name/filename.html>), and I would expect that the index would contain the same type of hrefs.

-Richard Livingston
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Relative Site Indexing

Post by mark »

You've lost me on what you really want to accomplish, but gw always requires a fully qualified url for walking and stores fully qualified urls in the database. You could strip the hostname off of urls before displaying them in the search results though. See <sandr> in the vortex manual.
richlivi
Posts: 2
Joined: Thu Jun 21, 2001 6:36 pm

Relative Site Indexing

Post by richlivi »

Looking at the <sandr> directive, I can see that it should allow me to do exactly what I'm trying to do. I do have a question though. What I want to do is strip out the "http://www.mysite.com" from the $Url variable.

I'm very inexperience with vortex (I just modified the pre-installed .vs files with my content to get everything to work), so could you tell me if this syntax looks okay?

<$expr = "http://www.mysite.com">
<$replace = "">
<sandr $expr $replace $Url>

My end goal is to have all <a href="..."> tags be relative instead of absolute (i.e. contain the fully qualified domain name) on my search results page.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Relative Site Indexing

Post by mark »

That should work. Remember that the results of the <sandr> are in $ret, not $Url. You may want to assign $ret back to $Url after the sandr.

<$Url=$ret>