|
From: | Antenore Gatta |
Subject: | Re: Microformats and logical URLs -- mod_rewrite |
Date: | Sat, 5 May 2007 14:37:36 +0200 |
if (isset($_GET['id'])
RewriteRule ...........
This evening or tomorrow I'll try also by myself (i hope).
Victor Engmark wrote:
> Looks like we're on a roll!
I am unable to carry out the mod_rewrite task for the current webapp.
https://savannah.nongnu.org/task/?6819
There are complex cases which I am unable to realize with modrewrite. See the
Appendix. As an example:
/offers
if "?id=XXX" is present go to View_Job_Offer.php
else go to FS_Job_Offers.php
I propose support the new URI design (see attached file) only at the new
Klaus' architecture, but not at the current one.
The new architecture must support that URI design without the need of
modrewrite. Realizing it directly with PHP will speed up the webapp. Klaus,
should we do it at the Controller?.
So, I am going to cancell the that ?6819 task.
What do you think?
Appendix
========
RewriteCond %{THE_REQUEST} ^.*/offers.*.id=.*$
RewriteRule ^/offers([?id=]*)(.*) /View_Job_Offer.php?JobOfferId=$2
RewriteCond %{REQUEST_URI} ^.*
RewriteRule ^/offers$ /FS_Job_Offers.php$1
Steps realized by the Apache modrewrite:
init rewrite engine with requested uri /offers
applying pattern '^/offers([?id=]*)(.*)' to uri '/offers'
RewriteCond: input='GET /offers?id=9 HTTP/1.1'
pattern='^.*/offers.*.id=.*$' => matched
rewrite '/offers' -> '/View_Job_Offer.php?JobOfferId='
split uri=/View_Job_Offer.php?JobOfferId= -> uri=/View_Job_Offer.php,
args=JobOfferId=
The problem is that the Apache modrewrite gets always as requested uri
/offers
both when we request gnuherds.org/offers?id=9
and too when we request gnuherds.org/offers
so, the below rewrite rule gets an empty ID, $2 value:
RewriteRule ^/offers([?id=]*)(.*) /View_Job_Offer.php?JobOfferId=$2
It seems the Apache 2.2.3 rewrite engine does not take into account the URI
parameters! ?id=XXX
Let me know if I am mistaken,
Davi
_______________________________________________
GnuHerds-app-dev mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/gnuherds-app-dev
[Prev in Thread] | Current Thread | [Next in Thread] |