Also handle the `index.php` fragment when storing the website path (see #5339)