PDA

View Full Version : CGI extentions and locations...


Justin
02-09-1999, 08:36 AM
My turn to ask a question again http://www.aota.net/ubb/smile.gif

I know a cgi can have any extention if it's in the cgi-bin, and I know that some servers can be set up to run a cgi in other directories as well. Can you do both?

Here's why I ask: If I release a new version of my program, naturally I'm going to remove the old version. But with so many shareware sites linking to it, I don't want to lose potential customers, considering how long Download.com takes to update.

So what if I had a cgi called vdj140.exe, which will simply be a Perl script to redirect to vdj150.exe? Or is there another way to automatically redirect requests to one file to another? I don't want to have ErrorDocument 404 /files/vdj150.exe http://www.aota.net/ubb/smile.gif That would be a little wierd.

But there's got to be a simple way to redirect that, so that they wouldn't even know anything happened, until they installed it and realized it's a new version (I'm sure they wouldn't be too upset). I remember reading something in the Apache docs about automatic redirection, but I don't think it was too specific.

Or possibly a cgi error handler that can redirect to the new file only if the REDIRECT_URL is vdj140.exe? And if not, redirect to 404.shtml? Or just print out the normal error message....

Ok, I might have answered my own question, but hey, if anyone has other ideas, let me know. I guess I'll post this anyway (don't you hate it when that happens?)

Of course, I would only pass 404's to the cgi, or at least not 500's - just in case (I locked up my machine playing with Apache Guardian)

http://www.aota.net/ubb/biggrin.gif


------------------
Justin Nelson, SFE Inc.
www.vdj.net (http://www.vdj.net)

[This message has been edited by Justin (edited 02-09-99).]

meikel
02-09-1999, 10:05 AM
Hi Justin,

I'm using another approach.
Since the first time, I had my own domain, the latest version of FreeMem is available as
FMEMPRO.ZIP file. This is totally independant of the version number.

So whenever I'm doing the update to 4.1, all shareware sites automatically point to the updated file.

Greetings from .............
[nbsp][nbsp]Meikel Weber

hearts
02-09-1999, 10:06 AM
Hi Justin...

couldln't you use a .htaccess file to do that?

----

meikel was aparently here the same time as me! http://www.aota.net/ubb/wink.gif and ya know what? I like his idea even better. a whole lot simpler. http://www.aota.net/ubb/smile.gif

hearts

[This message has been edited by hearts (edited 02-09-99).]

Justin
02-09-1999, 10:24 AM
The only problem with that is that a lot of archives won't accept a duplicate filename, and I like to keep the same name throughout. Besides that, I've always put the version number in the filename, mainly because if I don't, I get lost on my own hard drive. I've probably got 10 copies of my program, and file dates do me no good either because I'm always changing something. I'm just too disorganized to do something like naming different files the same name!

About the archives, I don't use them anymore, because they are more of a pain in the butt, but I still have always done it that way. I guess I could try to organize my hard drive... nah, I'm too lazy (if you could only see my room http://www.aota.net/ubb/smile.gif)

I still think that there has to be a simple way. I might go for the 404 cgi thing, where if you were trying to access it, it will just send you the new one, or give you a link to it and describe the new features, etc.

Meikel's idea is probably the better solution, but I like complications I guess, even if they aren't necessary http://www.aota.net/ubb/smile.gif That's just me. Have to learn the hard way.


------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

Jacob Stetser
02-09-1999, 11:29 AM
See if this works:

Remove the old version, and then use this:

ln -s fullpathtovdj150.exe vdj140.exe

This creates a symbolic link mapping any access to the old address to the new address.

When you're updating versions, just make new symbolic links pointing to the newest version from the old filenames http://www.aota.net/ubb/smile.gif

UPDATE: For general use, the ln command works like this:

ln -s existingfile newlinktoexistingfile

Any questions, feel free to email me. my email address is helpmewithsymlinks@icongarden.com http://www.aota.net/ubb/biggrin.gif

[This message has been edited by Jacob Stetser (edited 02-09-99).]

Deb
02-09-1999, 01:02 PM
I agree with Jacob.

Symbolic links are the best way to do what you are trying to do. Many people use the symbolic links to be able to update their files without forcing the end user to update their links...

Symbolic links are AWESOME!!!

Deb