How to process with apache2 all requests by one script? Without mods if it is possible.
A:
Generate URLs such as /index.php/topic/4/thread/3/
and then examine $_SERVER['PATH_INFO']
. Or just use normal query strings and use $_GET
.
Ignacio Vazquez-Abrams
2010-09-26 17:02:38
This is good. I know this. But without dot in address?
Miro
2010-09-27 15:09:49
Then you have no choice but to use something like mod_rewrite. mod_php isn't designed to multiplex everything through one script on its own.
Ignacio Vazquez-Abrams
2010-09-27 20:47:53
A:
I've did it with DocumentRoot:
DocumentRoot *site*/index.php
It generates warning, but it's working:
Warning: DocumentRoot [*site*/index.php] does not exist
Miro
2010-09-27 15:13:31
That's because it is not allowed (and it doesn't make sense) to use * in DocumentRoot. If /path/to/index.php as DocumentRoot works it's I think ok, but better way to get this working id to use mod_alias (AliasMatch) or mod_rewrite
msurovcak
2010-09-29 11:48:49