Extend Plugin Route301

0 views
Skip to first unread message

aAnuVizZ

unread,
Jul 10, 2010, 12:40:03 PM7/10/10
to habari-users
Hi everybody, my question is how to redirect all urls with the
exception of the ending with the extension ".html" example: /weblog/
2010/07/zro.html or /weblog/2010/07/mi-first-post.html

url valid for redirection
/weblog/2010/07/zro
/weblog/2010/07/mi-first-post

url invalid for redirection
/weblog/2010/07/zro.html
/weblog/2010/07/mi-first-post.html


ReGex Custom No work!

'parse_regex' => '%^weblog/(?P<year>[1,2]\d{3})/(?P<month>\d{2})/(?
P<slug>[^/]+)(?:/page/(?P<page>\d+)?)$%i',

'build_str' => 'weblog/{$year}/{$month}/{$slug}(page/{$page}/)',
'action' => 'display_entry',

this code makes everything validate
/weblog/2010/07/zro.html valid (This should not be valid)
/weblog/2010/07/zro valid

can anyone help me find the appropriate regular expression?


Reply all
Reply to author
Forward
0 new messages