<p>Ok, this works, the backslash behind "...language>" was wrong:</p>

<pre><code>'(?P&lt;title&gt;[-\w\d]+)\.(?P&lt;papayaId&gt;\d+)\.(?P&lt;language&gt;[\w]{2})\.html' =&gt; array('action' =&gt; 'jpk/rerouteOldPages'),
</code></pre>

CC BY-SA 3.0
2017-10-06T10:31:59.963Z
2017-10-06T10:31:59.963Z
phaetons
<p>I want to reroute old html pages.
The format is:  /title-35-of-page.863.en.html
I want to route every adresse with .html at the end also get the lang and id part of the address for further handling, but have problems with the dots.
This are some versions that i tried, but none of them worked.</p>

<pre><code>'(?P&lt;title&gt;[-\w\d]+).html' =&gt; array('action' =&gt; 'jpk/rerouteOldPages')
'(?P&lt;title&gt;[-\w\d]+)html' =&gt; array('action' =&gt; 'jpk/rerouteOldPages')
'(?P&lt;title&gt;[-\w\d]+)\.(?P&lt;papayaId&gt;\d+)\.(?P&lt;language&gt;\[a-z]{2})\.html' =&gt; array('action' =&gt; 'jpk/rerouteOldPages')
</code></pre>

<plugin-development><routes>
how to reroute old html pages?
# how to reroute old html pages?

(Asked by: username_0 on 2017-10-06)

I want to reroute old html pages.
The format is:  /title-35-of-page.863.en.html
I want to route every adresse with .html at the end also get the lang and id part of the address for further handling, but have problems with the dots.
This are some versions that i tried, but none of them worked.
'(?P[-\w\d]+).html' => array('action' => 'jpk/rerouteOldPages')
'(?P[-\w\d]+)html' => array('action' => 'jpk/rerouteOldPages')
'(?P[-\w\d]+)\.(?P\d+)\.(?P\[a-z]{2})\.html' => array('action' => 'jpk/rerouteOldPages')

**Tags:** plugin-development, routes

---

## 1 answers

### Answer by username_0 on 2017-10-06. Score: 1 | Accepted answer

Ok, this works, the backslash behind "...language>" was wrong:
'(?P[-\w\d]+)\.(?P\d+)\.(?P[\w]{2})\.html' => array('action' => 'jpk/rerouteOldPages'),


---

