Input:
- Base URL:
www.example.com/1/2/index.php
- Relative URL:
../../index.php
Output:
- Absolute URL:
www.example.com/index.php
It would be perfect, of it would be done using sed.
As I understand, this regex should delete one somefolder/
in for every ../
in the URL.