Jump to content

Yannick Albert

Members
  • Posts

    58
  • Joined

  • Last visited

Community Answers

  1. Yannick Albert's post in Remove part of URl with .htaccess was marked as the answer   
    Ok, good starting point, thanks so far! However, I think (also because of duplicate content) this approach is not the best. After a bit of research I found the perfect solution.
    Using a simple hook does the trick:
    http://processwire.com/talk/topic/1799-routes-and-rewriting-urls/?p=16708
    wire()->addHookAfter('Page::path', null, function(HookEvent $event) {   $page = $event->object;   if ($page->template == 'account-profile') { $event->return = '/'.$page->name.'/'; } }); Anyway, thanks for the fast support and explanation!
    Cheers,
    Yannick
×
×
  • Create New...