Forum

Rewriting to /

David Oliver
27 February 2015, 15:05
Hello,

I'm trying to rewrite any request path that begins with a certain string to the home page. (Ideally a

Match ^/gb/en-GB/ Rewrite /


However, '/gb/en-GB/unwanted' is being rewritten to '/unwanted'. How could I get rid of the unwanted part of the path please? I thought that the rest of the path should only appear if I captured it with () and used $1.

Hiawatha version: 9.12
Operating System: Ubuntu 14.04 LTS
Hugo Leisink
27 February 2015, 15:33
Just make the rest of the path part of the selection via .*
Match ^/gb/en-GB/.* Rewrite /
David Oliver
27 February 2015, 19:08
I see. That's great - thanks.
This topic has been closed.