T
T
Tenkoff2015-02-14 12:05:53
1C-Bitrix
Tenkoff, 2015-02-14 12:05:53

Strange behavior of regular expressions in urlrewrite, is it supposed to be like this or is something broken?

https://gist.github.com/Tenkoff/e0d52df664a7d4d6d42e
we focus on the condition /(\d+)/ - it should only catch numbers between slashes, but it eats everything

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Emelyanov, 2015-02-14
@babarun

Try like this

<?
array(
    "CONDITION" => "#^/test/([0-9]+)/(.)*\$#",
    "RULE" => "ELEMENT_ID=\$1",
    "ID" => "",
    "PATH" => "/test/index.php",
  ),
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question