tags:

views:

23

answers:

2

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
This is good. I know this. But without dot in address?
Miro
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
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
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
i've hiden path with *site*, the path is /home/miroslav/htdocs/... :)
Miro