title: rewriting part of urls using django
body: <p>I have a url like </p>
  
  <ol>
  <li>www.example.com/events/A/</li>
  <li>www.example.com/events/B/</li>
  </ol>
  
  <p>etc</p>
  
  <p>I would like to change that to </p>
  
  <ol>
  <li>www.example.com/portal/A/ and likewise.</li>
  </ol>
  
  <p>This can be achieved at Apache level, but can I do it in django using some middleware or something.</p>
  
  <p>I have tried using RedirectView like this </p>
  
  <pre><code>url(r'events/', RedirectView.as_view(url='/portal/')),
  </code></pre>
  
  <p>But that just stops at /portal and anything after the events/ is ignored.</p>
  
  <p>Is there a way to do this in django</p>