Gossamer Forum
Home : Products : Gossamer Links : Discussions :

path_info parameter passing.

Quote Reply
path_info parameter passing.
Hi,

This is basically a post that is that I wanted to continue on with that started in the Links SQL Pre Sales forum regarding another product.

After reading a few search engine optimisations articles, such as

http://hotwired.lycos.com/webmonkey/01/23/index1a.html

It seems that page.cgi should really have the option of using this method. I'm not sure how difficult it would be to make it an optionable feature, so that thoughs on *nix can use it, and people on windows can use it if they install the patch.

Coming from the point of view that dynamic pages are the only way to make a site, this would be a very big feature to add to Links SQL. Big sites such as Amazon.com as using this method to pass parameters. I wouldn't really have much of a problem "hacking" this feature in, as it is really quite basic - just one line of code if you want the easy way out :)

Would it be hard to make this option as a plug in though? I have NO experience with the plug-in system, but from my understanding it doesn't really alter things like page.cgi but rather it adds features?

Anyway - Just some feedback on some research I have been doing which I thought could really improve the product. I understand it can't be on by default due to windows not working with it - but with Linux it only has up sides.


Michael Bray
Quote Reply
Re: path_info parameter passing. In reply to
Hi!

I'll take a look and see what is involved. Basically you would just alter page.cgi to get it's input from PATH_INFO, and not $IN->param('g'). Then you just need to make the URL's look right. Thinking as I type, if you:

1. Set build_root_url to 'http://yoursite.com/cgi-bin/page.cgi'
2. Alter page.cgi and replace:

my $page = $IN->param('g') || '';

with:

my $page = $ENV{PATH_INFO} || '';

You should be done. Now when Links SQL create's it's links, they will look like:

http://yoursite.com/cgi-bin/page.cgi/New/index.html

Let me know how it works for you! If it does work, I'll alter page.cgi for the next release, so all people would have to do is set the build_root_url in the admin.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: path_info parameter passing. In reply to
Hi-

I've always wanted to do this and was quite happy to see it addressed on the forum. I tried changing each instance of:

my $page = $IN->param('g') || '';

with

my $page = $ENV{PATH_INFO} || '';

in page.cgi, and then I set the build_root_url to:

http://www.mydomain.com/cgi/page.cgi

That worked : ) in that I could then get pages dynamically at something like:

http://mydomain.com/cgi/page.cgi/directoryname/index.html

But then the category links on that page or the title_linked still used the dynamic style urls:

http://mydomain.com/cgi/page.cgi?g=directoryname/index.html?d=1&d=1


Is there a way to get these links also in the format without the question marks? That way the search engine robots can continue to crawl through the site and index more and more pages...

-jw



Quote Reply
Re: path_info parameter passing. In reply to
Hi,

Comment out:

# Make sure we set dynamic mode on.
$IN->param('d' => 1);

and see if it works.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: path_info parameter passing. In reply to
Thanks Alex. Tried that and it worked like a charm!

-jw

Quote Reply
Re: path_info parameter passing. In reply to
Hi,

Great, I'll put this in the next release so all you have to do is set the build path to page.cgi.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: path_info parameter passing. In reply to
Good work Alex. Quickest I have ever seen a modification approved/added to a piece of software. Its was a really good feature to add as well.

Michael Bray