Fixing URL rewrites for SPA compatibility