[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Microformats and logical URLs -- mod_rewrite

From: Antenore Gatta
Subject: Re: Microformats and logical URLs -- mod_rewrite
Date: Sat, 5 May 2007 14:37:36 +0200


Unlike I don't have so much time today...

Did you try to use a conditional rule?

if (isset($_GET['id'])

RewriteRule ...........

This evening or tomorrow I'll try also by myself (i hope).

On 5/5/07, Davi Leal <address@hidden> wrote:
Victor Engmark wrote:
> Looks like we're on a roll!

I am unable to carry out the mod_rewrite task for the current webapp.

There are complex cases which I am unable to realize with modrewrite. See the
Appendix. As an example:


    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?


  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,

The problem is that the Apache modrewrite gets always as requested uri
both when we request
and too when we request

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,


GnuHerds-app-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]