This is probably an htaaccess question.

They have: 15 posts

Joined: Apr 2004

I wrote a program in Visual Basic called gravitysimulator (you don't need to know VB to help me). This program creates an association between my program and data files with a .grv extention on a user's computer. So when a user visits my web site and clicks on filename.grv, it gives them that popup box that asks if they'd like to open the file, or save it to disk. If they choose open, their computer executes my Visual Basic program, and downloads and opens the .grv file they clicked on. (This is just like clicking on a file called document.doc will open Microsoft Word, and then it will download and open the file they clicked on.) To accomplish this I had to create a htaaccess file and put the following line in it:

AddType application/gravitysimulator grv

I used to host the program itself on a UNIX server, and the .grv files on a Windows server because I did not know about htaacess files at the time, and Windows server would provide the file association without a .htaaccess file. But before I can switch my .grv files to the UNIX server, I have to solve one more problem. The UNIX server combines all my lines in the .grv file into one line, and my Visual Basic program can not comprehend the data. For example if the first two lines of the data file (.grv) are:

abcd
efgh

the UNIX server combines them into one line:

abcd efgh

and the space that seperates them is an ASCII 10, not a space.

This creates a problem in my visual basic program because it wants the abcd in one variable, and the efgh in another variable. I could always modify the visual basic code to parse the lines when it sees an ASCII 10, but then everyone who already downloaded the program would need to download a new version. I'd rather figure out how to tell the UNIX server not to combine my lines into a single line seperated by ASCII 10s. Perhaps I could tell it that an ASCII 10 is a line feed? I imagine there's something I could put into my htaaccess file that would accomplish this. Any thoughts?