Overkill :wink: 

Please consider the following:

```php
$indexPage = '/' . ltrim( $indexPage, '/' );
```