You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leonardo Sá <le...@gmail.com> on 2005/12/04 19:43:40 UTC

[users@httpd] addhandler issue

Im writting a php based front controller for my website, and i choosed
to do so by redirecting all php file request to one file:

addhandler phphandler .php

works fine. However, I can only use GET requests within my scripts.
POST variables seem to get lost somehow. Is it possible to fix it or
is there any other way to do it?

Best Regards,
Leo

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] addhandler issue

Posted by Joshua Slive <js...@gmail.com>.
On 12/4/05, Leonardo Sá <le...@gmail.com> wrote:

> I have this on the .htaccess file:
>
> Action phphandler /handlers/main.php
> AddHandler phphandler .php
>
> So, anything.php would be handled by main.php right? Its working good,
> except that when using forms with method=POST, main.php does not
> receive the variables... I tried GET forms and they work good.
> Thanks for the reply.

This is a little bit of a strage setup.  I'm not sure why it doesn't
work; it may depend on what version you are running.  If it was me,
I'd try
AliasMatch .*\.php$ /full/path/to/handlers/main.php
instead.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] addhandler issue

Posted by Leonardo Sá <le...@gmail.com>.
---------- Forwarded message ----------
From: Leonardo Sá <le...@leo-sa.com>
Date: Dec 4, 2005 6:23 PM
Subject: Re: [users@httpd] addhandler issue
To: Joshua Slive <js...@gmail.com>


I have this on the .htaccess file:

Action phphandler /handlers/main.php
AddHandler phphandler .php

So, anything.php would be handled by main.php right? Its working good,
except that when using forms with method=POST, main.php does not
receive the variables... I tried GET forms and they work good.
Thanks for the reply.
Leo

On 12/4/05, Joshua Slive <js...@gmail.com> wrote:
> On 12/4/05, Leonardo Sá <le...@gmail.com> wrote:
> > Im writting a php based front controller for my website, and i choosed
> > to do so by redirecting all php file request to one file:
> >
> > addhandler phphandler .php
> >
> > works fine. However, I can only use GET requests within my scripts.
> > POST variables seem to get lost somehow. Is it possible to fix it or
> > is there any other way to do it?
>
> The above configuration doesn't redirect everything to one file.
> You'll need to show us what configuration you are using to do that
> before we can comment on whether there is a better way.
>
> Joshua.
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] addhandler issue

Posted by Joshua Slive <js...@gmail.com>.
On 12/4/05, Leonardo Sá <le...@gmail.com> wrote:
> Im writting a php based front controller for my website, and i choosed
> to do so by redirecting all php file request to one file:
>
> addhandler phphandler .php
>
> works fine. However, I can only use GET requests within my scripts.
> POST variables seem to get lost somehow. Is it possible to fix it or
> is there any other way to do it?

The above configuration doesn't redirect everything to one file. 
You'll need to show us what configuration you are using to do that
before we can comment on whether there is a better way.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org