How apache deals with file extensions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Folks,

The following question is simply to help me understand how apache is
doing something.

The scenario is:

In our docroot, there is a file as such:

/wrp/mary.html

If someone types the following url into a browser:

http://www.nrw.qld.gov.au/wrp/mary (**i.e. no .html extension)

Then Apache can locate the page and successfully logs the entry like
(note the 302 status):

123.123.123.123 - - [30/Jul/2008:09:59:01 +1000] "GET /wrp/mary
HTTP/1.1" 302 218 "-" "Mozilla/5.0 ......etc

This seems to also be the case for PDF's (.pdf) and PHP (.php) files.

This is the question(s):

As there is no extension, how can apache know what mimetype the file is
and successfully respond?? Does it try all sorts of common extensions
until it gets a response?

Also, is there a configuration item to tweak so that unless the full
(and correct) url is entered (like ../mary.html), it would return a 404
status?
 
Cheers, Craig


Craig Robinson
System Administrator , Web Services
Telephone: 07 3224 8877  Facsimile: 07 3227 4521  
Email: craig.robinson@xxxxxxxxxxxxxx
www.nrw.qld.gov.au

Department of Natural Resources and Water
41 George Street, Brisbane Q 4000
GPO 2454, Brisbane Q 4001


************************************************************************
The information in this email together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this email message is prohibited, unless
as a necessary part of Departmental business.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux