Skip to content

Commit

Permalink
Merge pull request #34 from azachwill/devcommit37
Browse files Browse the repository at this point in the history
devcommit37
  • Loading branch information
awilliams1275 authored Aug 20, 2024
2 parents 2be59ed + 47efa2a commit e693738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netlify/edge-functions/redirect_article.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default async (request, context) => {
const result = pattern.test(url);

// Check if the URL path is one of the index.html pages
if ( !result && !url.endsWith(".html")) {
if ( !result && !url.pathname.endsWith(".html")) {
// Remove the trailing slash and add .html extension
const newPathname = url.pathname.slice(0) + '.html';
const newUrl = `${url.origin}${newPathname}`;
Expand Down

0 comments on commit e693738

Please sign in to comment.