I have my application entry point like this.
/app/index.php <-- this is the main dispatcher.
And application specific folders under /app/
/app/todo/
/app/calendar/
/app/bugtrack/
Each application folder cotains application specific files.
I would like to pass all requests unders app to pass through /app/index.php.
So that.
/app/todo/list/today -> goes to /app/index.php
/app/ -> goes to /app/index.php
/app/bugtrack/anything/else goes to /app/index.php
On my lighttpd test machine I can easily do it it by writing a rule like this.
url.rewrite-once = (
"^\/app\/todo\/*" => "/app/index.php",
"^\/app\/calendar\/*" => "/app/index.php",
"^\/app\/bugtrack\/*" => "/app/index.php",
)
Now need to make it work on Apache using .htaccess and mod_rewrite.
But no matter what I do, it's not working.
I wrote the following in /app/.htaccess
RewriteEngine on
RewriteRule .* index.php [QSA]
It works for /app/ and /app/todo/ but fails for /app/todo/list/today for example.
Anyone can give me any idea how to do it?