Hey guys.... I'm trying to do something up to match this type of URL: video/2-Episode_10_True.html But I can't seem to get it working..... my code is below, what am I doing wrong? RedirectMatch ^video/[0-9]+-([^_\-]_)+.+\.html$ http://www.mydomain.com/ Code (markup): So I can learn better can you please explain what I did wrong.... Thanks!
[^_\-]_ Code (markup): That allows for one character between the first hyphen and the underscore. 2-E_ would likely match. So would 2-E_p_i_s_o_d_e
Ahhhhh I see..... so I should change it to something like this? RedirectMatch ^video/[0-9]+-([^_\-]+_)+.+\.html$ http://www.mydomain.com/ Code (markup): ?? Thanks!
It wont ever match with ^video. The url path starts with a slash. joebert is right too. .+ before \.html is an overkill, [^\.]* was better. Why not try this (make _ optional): RedirectMatch video/[0-9]+-([^_\-]+_?)+\.html$ http://www.mydomain.com/ Code (markup): Still, more simple: RedirectMatch video/[0-9]+-[^\.]+\.html$ http://www.mydomain.com/ Code (markup): Or if you are sure that files under video/ are definitely videos: RedirectMatch video/.*$ http://www.mydomain.com/ Code (markup): Use ^/video if video is a top level directory.