|
|
||||||
|
#1
|
|
|
|
|
Some time ago, I configured the server I use so that the HTML pages
like: http://www.westmidlandbirdclub.com/k...denham2008.htm could be accessed using URLs in the format http://www.westmidlandbirdclub.com/k...r/bodenham2008 in the meantime I've forgotten how & where I did that - it might even be that my hosts, Gradwell, did it for me - there's nothing related, in my ..htaccess file I now have some files at: http://www.westmidlandbirdclub.com/k...denham2008.csv http://www.westmidlandbirdclub.com/k...denham2008.xcl However, when I now try to download: http://www.westmidlandbirdclub.com/k...r/bodenham2008 my browser tries to open the .csv file. How can I fix that? |
|
|
|
#2
|
|
|
|
|
On Wed, 1 Jul 2009 20:58:30 +0100, Andy Mabbett
<usenet200309> wrote: > >I now have some files at: > > [..] > [..] > >However, when I now try to download: > > [..] > >my browser tries to open the .csv file. > >How can I fix that? Rename the files? Failing that, if there isn't a rewrite rule in .htaccess, you'll have to speak to Gradwell. Oh, hi Andy, long time no see. :) |
|
#3
|
|
|
|
|
On Wed, 1 Jul 2009 20:58:30 +0100, Andy Mabbett
<usenet200309> wrote in <7j6L18nm$7SKFwWT>: >Some time ago, I configured the server I use so that the HTML pages >like: > > [..] > >could be accessed using URLs in the format > > [..] > >in the meantime I've forgotten how & where I did that - it might even be >that my hosts, Gradwell, did it for me - there's nothing related, in my >.htaccess file If the server is Apache then perhps you are using "Content Negotiation": <http://httpd.apache.org/docs/2.0/content-negotiation.html> and in particular 'Multiviews'. This looks to me like one of those area that gets really difficult if you do not have complete control of the server configration and an expert level understanding of what headers browsers send. |
|
#4
|
|
|
|
|
On Wed, 1 Jul 2009 20:58:30 +0100, Andy Mabbett put finger to keyboard
and typed: [..] > [..] > [..] > >However, when I now try to download: > > [..] > >my browser tries to open the .csv file. > >How can I fix that? You appear to be using content negotiation, which may well be enabled by default (it often is). That's a simple way of getting the effect that you describe, but it can have unexpected results. In particular, to the server, .htm and .csv are both text files - the browser will render them differently, but their actual contents are text. So, unless explicitly instructed otherwise, when asked for a text file of a certain name with no extension, it will pick the first. And that, alphapbetically, is the .csv file. One possible solution is to call your HTML files .html rather than ..htm. The latter is a Microsoftism that's a hangover from the days when Windows 3.x couldn't cope with extensions longer than three characters, and the chances are the the server isn't configured to treat them specifically as HTML - it's probably just any other random TLA extension as far as the server is concerned. But the server probably is configured to recognise .html specifically as an HTML file, and hence serve that in preference to a similarly-named text file when the browser asks for a file without the extension. Mark |
|
#5
|
|
|
|
|
On Thu, 02 Jul 2009 07:03:33 +0100, Mark Goodge
<usenet> wrote: >You appear to be using content negotiation, which may well be enabled >by default (it often is). That's a simple way of getting the effect >that you describe, but it can have unexpected results. In particular, >to the server, .htm and .csv are both text files - the browser will >render them differently, but their actual contents are text. So, >unless explicitly instructed otherwise, when asked for a text file of >a certain name with no extension, it will pick the first. And that, >alphapbetically, is the .csv file. Would a .htaccess rewrite rule e.g. RewriteRule ^bodenham2008$ bodenham2008.htm override that? |
|
#6
|
|
|
|
|
On Wed, 1 Jul 2009, Andy Mabbett wrote:
> Some time ago, I configured the server I use so that the HTML pages > like: > [..] > could be accessed using URLs in the format > [..] Options +Multiviews > I now have some files at: > [..] > [..] > However, when I now try to download: > [..] > my browser tries to open the .csv file. AddType text/csv;qs=0.8 csv AddType text/xml;qs=0.9 xcl I don't know what you actually mean by ".csv" and ".xcl". You should put the correct MIME type where I just wrote text/csv and text/xml. |
|
#7
|
|
|
|
|
On Thu, 02 Jul 2009 09:38:28 +0100, Geoff Berrow put finger to
keyboard and typed: >On Thu, 02 Jul 2009 07:03:33 +0100, Mark Goodge ><usenet> wrote: >> >Would a .htaccess rewrite rule e.g. > >RewriteRule ^bodenham2008$ bodenham2008.htm > >override that? Probably, yes. But that's a bit of a kludge. Mark |
|
|
| Similar Threads | |
| Confusion I always thought Four Marks was a nickname for somewhere but was too shy to ask the question, then today I drove throught it, but then rather later on my trip to Welsh Wales... |
|
| ssh confusion I'm confused If I ssh into my server using the IP address, it complains about the lack of certificate, and chucks me off. If, from the same acccount and same computer, I ... |
|
| 3 & TM confusion I just got my new 3 phone. Basically, I was made an offer I couldn't refuse so I thought I could get a second contract and see what I would do with my out-of contract... |
|
| NTL confusion Hi, I'm interested in getting NTL broadband with the free offpeak calls. I also want a package where I can download at least 1 GB a day. [..] According to the above URL I... |
|
| QoS confusion Hi I've been looking at implementating QoS on the new IPCop box I have set up thanks to the suggestions of some of you here on the forum. However after spending an evening... |
|
|
All times are GMT. The time now is 02:15. | Privacy Policy
|