ReWriteRuel and Regular Expressions

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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.html is requested, and need to
be written as script.php?x=abc&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_klmnop_qrst_tuv_wxyz.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? ;-)


Re: ReWriteRuel and Regular Expressions wrote:
Quoted text here. Click to load it

And your PHP question is???

Try one of the Apache mailing lists on

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline