Forum Moderators: phranque

Message Too Old, No Replies

what does this part of a htaccess rule mean?

         

opalplus

1:29 am on Nov 8, 2006 (gmt 0)

10+ Year Member



g'day,

i'm just wondering what precisely the {3,9} part of the below rules means? Is it specifying the max length or something of the filenames? If so why won't it break no matter what length I apply it to.

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /page\.php

jdMorgan

1:44 am on Nov 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



{3,9} means any number between 3 and 9 of the preceding character, character set, or parenthesized sub-expression. See the regular-expressions tutorial cited in our forum charter for more info.

Specific to this rule, it means 3 to 9 capital letters A through Z, and is intended to match the HTTP methods, e.g. GET, POST, PROPFIND, etc.

Jim

opalplus

11:30 pm on Nov 8, 2006 (gmt 0)

10+ Year Member



awesome thanks jim