logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: custom index.php for every subdirectory using mod_rewrite
Author
sawo



Joined: 15 May 2008
Posts: 36

PostPosted: Tue 01 Mar '11 10:45    Post subject: custom index.php for every subdirectory using mod_rewrite Reply with quote

Hi i have this scenario for example:
/root/index.php
/root/data/
root/logs/
I want every subdirectory of /root/ to have that index.php so i wont have to copy it manually.
Sorry for the lame question, but i dont have much experience with mod_rewrite aparat from the fancy url's Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 16 Mar '11 1:50    Post subject: Reply with quote

Maybe something like this?
Code:

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
Back to top


Reply to topic   Topic: custom index.php for every subdirectory using mod_rewrite View previous topic :: View next topic
Post new topic   Forum Index -> Apache