Hi Guys, I hope someone can help me with this. I am trying to match this url. /videos/nice-video-.html Code (markup): Right now I have this RewriteRule ^videos/([_A-Za-z0-9-]+)/?$ tms_redirect.php?mediaurl=$1 [NC,L] Code (markup): This will match this url /videos/nice-video.html Code (markup): But I need it to match with the - between video and .html. I tried several variations but I can get it to work. Thanks in advance.
Rewrite rule you provided will not match both of these urls, because it doesn't allow the dot sign and could match only directories without (.html) part. It seems you have another line in your .htaccess for .html handling.
Maby try this: [a-zA-Z0-9\-] and add the .html RewriteRule ^videos/([_A-Za-z0-9\-]+).html/?$ tms_redirect.php?mediaurl=$1 [NC,L]
Thanks for your help. I got this to work. RewriteRule ^videos/([-_A-Za-z0-9-]+)/?.html$ Now http://www.chopperpunks.com/videos/diy-speakers-for-your-harley.html goes to http://www.chopperpunks.com/mediaviewer/80/diy-speakers-for-your-harley.html