Hi,
I'm stuck trying to make some rewrite rules.
The goal is to transform :
1) <domain>/part1+++part2.php to <domain>/part1/part2.php
2) <domain>/part1+++part2+++part3.php to <domain>/part1/part2/part3.php
So far I have come up with two rules to match the urls, but when using rewrite I get 404's and the links on the page is not rewritten.
I have tried both these options:
if ($request_uri ~* "^(.*)(\+{3})(.*)$")
{
rewrite ^(.*)$ $1/$3 last;
}
or just a : rewrite "^(.*)(\+{3})(.*)$" $1/$3 last;
for 2) I use "^(.*)(\+{3})(.*)(\+{3})(.*)$" as the regex.
Can anyone please help me out here ?
What am I doing wrong ?