Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Renaming Page.Cgi

Quote Reply
Renaming Page.Cgi
Hi,

How does one go about renaming page.cgi so that it recognises that the new filename is not page.cgi when it encounters things such as $build_root_url, category links and detailed_url?

Last edited by:

Donald Rumsfeld: Jul 12, 2002, 4:30 AM
Quote Reply
Re: [Donald Rumsfeld] Renaming Page.Cgi In reply to
Also, how would one rename it index.cgi so that all of the urls were as as such http://server/?page=whatever
Quote Reply
Re: [Donald Rumsfeld] Renaming Page.Cgi In reply to
I think you might be better off using symlinks to do that (under Unix), or creating a new copy of page.cgi and calling it whateever you wanted. Leave the old page.cgi alone, to pick up the other calls.

You can then modify your templates and slowly migrate to the new name, but your site will still continue to work, the worst that happens is page.cgi is called, not the newly named file.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Renaming Page.Cgi In reply to
Hi, I realise that symlinks etc are a possibility, but I am looking for a code solution. I have no idea where it specifies that page.cgi is indeed called page.cgi - could someone from give me a hint please?:
Quote Reply
Re: [pugdog] Renaming Page.Cgi In reply to
hey pugdog, how would u use symlinks to archieve the above?
Quote Reply
Re: [Donald Rumsfeld] Renaming Page.Cgi In reply to
The only places, where page.cgi is explicitely called are:

Links.pm
Links/User/Page.pm
Links/User/Rate.pm

So you would have to change page.cgi into index.cgi (or whatever you want) in there.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [xpert] Renaming Page.Cgi In reply to
I haven't thought about it, but I have done it with other programs (like HamWeather) where I needed to map the beta distribution to the current.

Just create a new name for page.cgi as a symlink in your directory.

You may need to have exec or follow symlinks (or whatever that apache command is) enabled to do that for .cgi's, but it *does* work :)

Whether it will solve the problem, I don't know.

The only way to really "hide" what is in the URL is to use cookies and session data, and append that into the calling script after it's been called.

It's more over head and programming, but it keeps the URL's short.

It's also not infallible! How many sites have you been on where the short URL suddenly exploded into something resembling a lightning strike near a 2400 baud modem! :)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Renaming Page.Cgi In reply to
The thing is that after a few symlinked pages have loaded page.cgi will code the href going to page.cgi rather than to index.cgi, rendering the symlink pointless.
Quote Reply
Re: [Donald Rumsfeld] Renaming Page.Cgi In reply to
Thanks for your help though.