Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 5th, 2002, 11:32 AM
Kimppa Kimppa is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: Finland
Posts: 711 Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 19 h 19 m 54 sec
Reputation Power: 35
Show index.php as index

How do I configure Apache so that if a folder doesn't contain index.html but there's an index.php it will show the php-file as the index?
__________________
Fatal error on row 561: Couldn't access life - life isn't set

Reply With Quote
  #2  
Old March 5th, 2002, 11:42 AM
mezz mezz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 310 mezz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Configure it in your httpd.conf follows:

DirectoryIndex index.php index.html

If you can't control the httpd.conf then you still can put this in the .htaccess.

Reply With Quote
  #3  
Old March 5th, 2002, 11:46 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> there's an index.php it will show the php-file as the index?

Then you can't really use index.php.

1) You need to remove index.php from DirectoryIndex and append index to it:

DirectoryIndex index.html index

2) Force type on index file:
<FilesMatch "^index$">
ForceType application/x-httpd-php
</FilesMatch>

3) Rename all index.php to index

Reply With Quote
  #4  
Old March 5th, 2002, 12:00 PM
Kimppa Kimppa is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: Finland
Posts: 711 Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level)Kimppa User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 5 Days 19 h 19 m 54 sec
Reputation Power: 35
Thanks, got it to work

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Show index.php as index


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT