Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite

reg exp quick question

         

lethal0r

9:22 pm on Mar 9, 2007 (gmt 0)

10+ Year Member



how do i match a series of any characters, but the series cant be entirely comprised of numerical characters?

im just learning mod_rewrite and my head is about to explode!

thanks.

phranque

12:28 am on Mar 10, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you must first be very specific about your description of the regular expression.
for example a couple of blanks matches your description, but i'm not sure that is what you want.

jdMorgan

5:14 am on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just look for "NOT all numbers":

# if URL-path is not only numbers, rewrite it to /new-url-path and exit
RewriteRule !^[0-9]+$ /new-url-path [L]

Jim

lethal0r

4:24 pm on Mar 10, 2007 (gmt 0)

10+ Year Member



thank you.