ReWriteRuel and Regular Expressions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jason@webgenius.com.au

    ReWriteRuel and Regular Expressions

    Hi folks,

    My apologies if this is the wrong group to post to on this subject, and
    any guidance to the correct group would be appreciated.

    I am attempting to create a RewriteRule entry [for URL rewriting] and I
    am uncertain if what I would like is even possible.

    Assuming a URL of the format abc_def_hij.htm l is requested, and need to
    be written as script.php?x=ab c&x=def&x=hij , I can do regexp to
    successfully do the rewrite on that.

    The problem is that the number of words with underscore separators is
    unknown, so I could need to rewrite abc_def.html, or
    abc_def_hij_klm nop_qrst_tuv_wx yz.html - I won't have knowledge of the
    request in advance (although there will be a practical limit of no more
    than about 10 "parameters " in total.)

    Is there a regexp that can help out in this instance, or should I tell
    the client his hopes and dreams have been mercilessly shattered? ;-)

    Elmo

  • Jerry Stuckle

    #2
    Re: ReWriteRuel and Regular Expressions

    jason@webgenius .com.au wrote:[color=blue]
    > Hi folks,
    >
    > My apologies if this is the wrong group to post to on this subject, and
    > any guidance to the correct group would be appreciated.
    >
    > I am attempting to create a RewriteRule entry [for URL rewriting] and I
    > am uncertain if what I would like is even possible.
    >
    > Assuming a URL of the format abc_def_hij.htm l is requested, and need to
    > be written as script.php?x=ab c&x=def&x=hij , I can do regexp to
    > successfully do the rewrite on that.
    >
    > The problem is that the number of words with underscore separators is
    > unknown, so I could need to rewrite abc_def.html, or
    > abc_def_hij_klm nop_qrst_tuv_wx yz.html - I won't have knowledge of the
    > request in advance (although there will be a practical limit of no more
    > than about 10 "parameters " in total.)
    >
    > Is there a regexp that can help out in this instance, or should I tell
    > the client his hopes and dreams have been mercilessly shattered? ;-)
    >
    > Elmo
    >[/color]

    And your PHP question is???

    Try one of the Apache mailing lists on www.apache.org.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...