Skip to content

Commit

Permalink
MWPW-161697 Fix smart redirects .html issue (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
amol-anand authored Nov 6, 2024
1 parent 1719919 commit fda89b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export async function isValidRedirect(url) {

export async function applyRedirects(
redirects = fetchRedirects(),
path = window.location.pathname,
path = window.location.pathname.replace('.html', ''),
) {
const redirect = await getRedirect(redirects, path, new URL(window.location.href));
if (redirect && await isValidRedirect(redirect)) {
Expand Down

0 comments on commit fda89b2

Please sign in to comment.