Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: custom index.php for every subdirectory using mod_rewrite |
|
Author |
|
sawo
Joined: 15 May 2008 Posts: 36
|
Posted: Tue 01 Mar '11 10:45 Post subject: custom index.php for every subdirectory using mod_rewrite |
|
|
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  |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7407 Location: EU, Germany, Next to Hamburg
|
Posted: Wed 16 Mar '11 1:50 Post subject: |
|
|
Maybe something like this?
Code: |
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
|
|
|
Back to top |
|
|
|
|
|
|