Re: [users@httpd] Invoking PHP without .php extension?

2011-07-08 Thread Jeroen Geilman
On 2011-07-07 19:54, Michael B Allen wrote: I want a request like: /base/path/to/target?foo=bar to invoke a particular PHP file for everything under /base. It seems the usual way (only way?) to do this is with something like: AddHandler php5-script .php AddType text/html .php

Re: [users@httpd] Invoking PHP without .php extension?

2011-07-08 Thread Michael B Allen
On Fri, Jul 8, 2011 at 12:13 PM, Jeroen Geilman jer...@adaptr.nl wrote: On 2011-07-07 19:54, Michael B Allen wrote: I want a request like:   /base/path/to/target?foo=bar to invoke a particular PHP file for everything under /base. It seems the usual way (only way?) to do this is with

[users@httpd] Invoking PHP without .php extension?

2011-07-07 Thread Michael B Allen
I want a request like: /base/path/to/target?foo=bar to invoke a particular PHP file for everything under /base. It seems the usual way (only way?) to do this is with something like: AddHandler php5-script .php AddType text/html .php DirectoryIndex index.php and with directives like:

Re: [users@httpd] Invoking PHP without .php extension?

2011-07-07 Thread Devraj Mukherjee
Hi, If your Rewrite rule reads something like this RewriteRule ^api/(.*) api-gateway.php [L] Then basically you can extract the last few bit using regular expression in our case $urlParts = null; preg_match('/api\/([^\/]+)\/([0-9]+)*/', $_SERVER['REQUEST_URI'], $urlParts); $handlerName =

Re: [users@httpd] Invoking PHP without .php extension?

2011-07-07 Thread Michael B Allen
On Thu, Jul 7, 2011 at 7:02 PM, Devraj Mukherjee dev...@gmail.com wrote: Hi, If your Rewrite rule reads something like this RewriteRule ^api/(.*) api-gateway.php   [L] Then basically you can extract the last few bit using regular expression in our case $urlParts = null;

Re: [users@httpd] Invoking PHP without .php extension?

2011-07-07 Thread Devraj Mukherjee
On Fri, Jul 8, 2011 at 9:54 AM, Michael B Allen iop...@gmail.com wrote: This is a wreck and I must say I don't think it has much to do with PHP. It has to do with the CGI model which is all but dead. Considered Python via mod_wsgi?

Re: [users@httpd] Invoking PHP without .php extension?

2011-07-07 Thread Michael B Allen
On Thu, Jul 7, 2011 at 9:35 PM, Devraj Mukherjee dev...@gmail.com wrote: On Fri, Jul 8, 2011 at 9:54 AM, Michael B Allen iop...@gmail.com wrote: This is a wreck and I must say I don't think it has much to do with PHP. It has to do with the CGI model which is all but dead. Considered Python