Reply to Re: PHP - Preprocessing Filters using wildcards on URL path

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация