|
Posted by Jerry Stuckle on 07/05/07 14:49
Alexey Kulentsov wrote:
> TATrader wrote:
> ...
>> User types: http://domain.com/myapp/restofpath.html
>> In a Java servlet, there exists a web-app which maps /myapp/* to a
>> cookie checking filter before routing it to restofpath.html.
> ...
>
> PHP can't, but it's not a problem because this is standard feature of
> apache. See http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html for
> details. So:
> step 1. redirect URL by mask to 'filtering' script, adding old URL as
> parameter (is .htaccess file).
> step 2. check in this script all that you need and then call manually
> actual page using include directive.
>
> If you don't have mod_rewrite and can't setup it (bad provider case) you
> can use ErrorDocument directive (again .htaccess)
Actually, it's not the same thing, Alexey. For one thing, POST values
will be passed to the filter script, but not to the new page. You would
have to save values in the $_SESSION or something similar.
I'm not saying it can't be done. But it's a lot more work than in Java.
Perhaps a better way would be to include() the filter at the top of each
page and process the values. Still not the same, but closer.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|