12-24-2008, 06:08 PM
|
#7 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
The problem is not with the regex specifically, but with the lines order. #2 should be first, and #1 should be second. Assume you want to test this string: watch/seriesNumber/episodeNumber. Rule #1 is hit, because watch/ is present in the beginning of the string, and that's about all that rule assumes. Being the [L](ast rule to process), once the condition is met, the .htaccess file is never processed. Now, your rules are also broken.
That pattern will match "everything that is not a character nor a forward slash". That sounds pretty ambigous, don't you think? You'd better go for:
Code:
^watch\/([^\/]+)\/([^\/]+)\/?$
-- #2
, respectively:
Code:
^watch\/([^\/]+)\/?$
-- #1
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|