LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2009, 07:52 PM   #1
dbldee
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
Apache will not load index file in subdirectories


PHP Code:
#The "Category" text here needs to be changed if the language variable category is changed 
RewriteRule ^Category\/(.+)/$ index.php?id=$1
RewriteRule 
^Category\/(.+)/([0-9]+)\.htmlindex.php?id=$1&page=$

#Handle all location links.  Static location text followed by ID, followed by path
#The "Location" text here needs to be changed if the language variable location is changed
RewriteRule ^Location\/(.+)/$ index_locations.php?id=$1
RewriteRule 
^Location\/(.+)/([0-9]+)\.htmlindex_locations.php?id=$1&page=$

#Handle Custom Module Pages
RewriteRule ^view-(.+)\.htmlmodule_page.php?moduleid=$1
                          
#Ignore any physical files
#Handle all listing links.  Listing ID followed by listing name or corresponding pages.
RewriteRule ^out-([0-9]+)\.htmllisting_out.php?id=$1
RewriteCond 
%{REQUEST_URI} !-f
RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteRule 
^([^/]+)\.htmllisting.php?id=$
RewriteRule 
^(.+)/gallery\.htmllisting_gallery.php?id=$
RewriteRule 
^(.+)/send-message\.htmllisting_email.php?id=$
RewriteRule 
^(.+)/send-message-friend\.htmllisting_email_friend.php?id=$
RewriteRule 
^(.+)/reviews\.htmllisting_reviews.php?id=$
RewriteRule 
^(.+)/add-review\.htmllisting_add_review.php?id=$
RewriteRule 
^(.+)/products-(.+)\.htmllisting_products.php?id=$1&type=$
RewriteRule 
^(.+)/documents\.htmllisting_documents.php?id=$[L]
</
IfModule>

# handle links of affiliate Director 2.0
RewriteEngine on
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.+)/([a-z_\-]+)/?$ /ad2/redirect.php?site=$[NC,L]
ErrorDocument 404 /
ErrorDocument 403 /
ErrorDocument 500 /

RewriteEngine on
RewriteRule 
^([^\.]*)?\.htmindex.php?name=$[NC,L]

RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}] 

Index files in subdirectory are re-directed to root


Root
Subdirectory
subdirectory2
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache index file Location avoll Linux - Networking 3 06-14-2017 12:16 PM
How to load an index.htm file to replace IT WORKS! :) nighttraindb Slackware 13 08-31-2008 01:23 PM
Browser cannot load Apache index.html tekmann33 General 7 02-19-2007 03:57 PM
apache: shows only my index.php and no other file! xpucto Linux - Software 12 02-21-2006 03:37 AM
[apache 2.0] can't get index.html to load fraggie Linux - Software 5 04-09-2005 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration