Apache config: setting default file extension ?

Apache config: setting default file extension ?

Post by Jim McGra » Fri, 08 Nov 1996 04:00:00



Good Day all

I am looking for a way to make Apache treat the URL

http://server/directory/filename

as

http://server/directory/filename.html

I want this to happen when there is no actual file 'filename', but there
is a 'filename.htm' or  'filename.html'.

Thanks in Advance

Jim

 
 
 

Apache config: setting default file extension ?

Post by TeeJ » Sat, 09 Nov 1996 04:00:00


[Posted and mailed]

On 07 Nov 1996, Jim McGrady posted the following:

Quote:> Good Day all

> I am looking for a way to make Apache treat the URL

> http://server/directory/filename

> as

> http://server/directory/filename.html

> I want this to happen when there is no actual file 'filename', but there
> is a 'filename.htm' or  'filename.html'.

Try adding "MultiViews" to the "Options" line in access.conf. Works for
me. :)

--
TeeJay signing off while saying:
                      "Avoid the Gates of Hell.  Use Linux"

 
 
 

1. RHL7.0 and PHP4: Apache config file problem: file extensions

The /etc/httpd/conf/httpd.conf file that comes with RHL7.0 contains the
following lines (see below). This is pointless as Red Hat 7.0 does not
install PHP/FI which is now outdated and does not install PHP3 either
but does install PHP4 which is broken up into the packages php-ldap,
mod_php, php, php-imap, php-mysql, php-pgsql, and php-manual. Hence
the PHP/FI and perhaps also the PHP3 lines should have been commented
out by the RPM spec file as I can now use .php3 extensions but not
.php or .php4 extensions for files to be correctly interpreted by the
Apache web server and I am not root on the system hence I cannot change
this. Has this problem been fixed in Red Hat 7.1?

Thanks!

# The following is for PHP4 (conficts with PHP/FI, below):
<IfModule mod_php4.c>
  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps
</IfModule>

# The following is for PHP3:
<IfModule mod_php3.c>
  AddType application/x-httpd-php3 .php3
  AddType application/x-httpd-php3-source .phps
</IfModule>

# The following is for PHP/FI (PHP2):
<IfModule mod_php.c>
  AddType application/x-httpd-php .phtml
</IfModule>

2. Announce: Industrial Linux site

3. Custom file extensions with Apache/frontpage98 extensions

4. how do I disk copy sector by sector

5. What does the SOCKS4 setting doing in the Apache config file.

6. Security note about NCSA httpd-1.4.2

7. Default file extension .html ?

8. Help! : Linux Networking Guide

9. default html or htm file extension

10. Setting default file permissions on ftp'd files.

11. Apache apache 1.3.26 config file

12. How to set the default rc file from .bashrc to our own file.

13. I want FTP default to be -rwxrwxrwx files, NOT system default like -rw-rw-rw- files !