[OT]Apache file extensions
I have been using the SuSE packaged Apache and PHP RPMs. Now I am trying to setup an apache install with php support uisng the tarballs from apache.org and php.net. I have downloaded Apache 1.3.27 and PHP 4.3.1 Everything works except, I have to put the extension on the file name I want in the URL... for example instead of saying "http://site/test" I have to say "http://site/test.html" same goes for my PHP scripts, If I add the ".php" extension to the URL I am ok, without it the page does not come up. What configuration directives should I be using to not have to use the extensions? I have the "handmade" install in /opt/apache_1.3.27 and SuSE's is started via. /etc/init.d/apache so I swap between the two as I try to narrow this down. Many thanks, Ahbaid.
use the following directive in the httpd.conf file should work... # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.php3 test.html </IfModule> ##### Ahbaid Gaffoor wrote:
I have been using the SuSE packaged Apache and PHP RPMs. Now I am trying to setup an apache install with php support uisng the tarballs from apache.org and php.net. I have downloaded Apache 1.3.27 and PHP 4.3.1
Everything works except, I have to put the extension on the file name I want in the URL...
for example instead of saying "http://site/test" I have to say "http://site/test.html" same goes for my PHP scripts, If I add the ".php" extension to the URL I am ok, without it the page does not come up.
What configuration directives should I be using to not have to use the extensions?
I have the "handmade" install in /opt/apache_1.3.27 and SuSE's is started via. /etc/init.d/apache so I swap between the two as I try to narrow this down.
Many thanks,
Ahbaid.
-- ------------------------------------------------------------------------------- Disparate Needs ------ One Solution --- INETBOX Ampersand Info-Tech Pvt.Ltd phone +91 (0)11 / 2693 3118 New Delhi -- Munich fax +91 (0)11 / 2632 2980 http://www.aitpl.com mobile +91 (0)98101/57881 Linux - Solaris - Windows - Software Application Partners ------------------------------------------------------------------------------- The information contained in this message (including any attachments)is confidential and may be legally privileged. If you are not the intended recipient, please delete it from your system immediately - any disclosure, copying or distribution thereof or any action taken or omitted to be taken in reliance thereon is prohibited and may be unlawful. AITPL makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained herein or for the transmission, reception, storage or use of such information in any way whatsoever. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of AITPL. -------------------------------------------------------------------------------
Thanks for the response, that Directive is already in there. I am using Virtual Named Hosts, is it that this needs to be specified in each virtual host as well? Not too sure if that's the case.... But even with it in place it still does not work... Ahbaid. Vishal Khanna wrote:
use the following directive in the httpd.conf file should work...
# # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.php3 test.html </IfModule> #####
Ahbaid Gaffoor wrote:
I have been using the SuSE packaged Apache and PHP RPMs. Now I am trying to setup an apache install with php support uisng the tarballs from apache.org and php.net. I have downloaded Apache 1.3.27 and PHP 4.3.1
Everything works except, I have to put the extension on the file name I want in the URL...
for example instead of saying "http://site/test" I have to say "http://site/test.html" same goes for my PHP scripts, If I add the ".php" extension to the URL I am ok, without it the page does not come up.
What configuration directives should I be using to not have to use the extensions?
I have the "handmade" install in /opt/apache_1.3.27 and SuSE's is started via. /etc/init.d/apache so I swap between the two as I try to narrow this down.
Many thanks,
Ahbaid.
I know this is a very late response, but in case you haven't solved it by now... IIRC you have to create a directory with the name you want as the last part of the url 'test' in your example, and put the file in that directory renamed to index.html. So instead of creating a page test.html create the file test/index.html. HTH On Thu, 2003-03-20 at 06:02, Ahbaid Gaffoor wrote: [snip]
Everything works except, I have to put the extension on the file name I want in the URL...
for example instead of saying "http://site/test" I have to say "http://site/test.html" same goes for my PHP scripts, If I add the ".php" extension to the URL I am ok, without it the page does not come up.
What configuration directives should I be using to not have to use the extensions? [snip]
-- # Mertens Bram "M8ram" <bram-mertens@linux.be> Linux User #249103 # # SuSE 8.1 Pro kernel 2.4.20-4GB i686 128MB RAM # # 10:30am up 1 day, 9:47, 7 users, load average: 0.20, 0.08, 0.02 #
participants (3)
-
Ahbaid Gaffoor
-
Bram Mertens
-
Vishal Khanna