Skip to content

Rewrite any page URL extensions from .html to / #929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sitetools opened this issue Mar 17, 2025 · 0 comments
Open

Rewrite any page URL extensions from .html to / #929

Sitetools opened this issue Mar 17, 2025 · 0 comments

Comments

@Sitetools
Copy link

Sitetools commented Mar 17, 2025

Expected behavior

We are archiving a website that has had a few incarnations, the older archives have pages with a .html extension and the newer archives have /.
I want any pages with the exact URL paths except for the file extension (like below) to treated as if they are the same URL.

What actually happened

If I navigate to https://mydomain.com/segment-1/segment-2.html I only able to see dates where this exact page URL was archived and not pages with https://mydomain.com/segment-1/segment-2/ that were archived at a later date.

Things I have tried

I have tried many variations of filtering and fuzzy matching in config.yaml, I did add a rules.yaml file but it was ignored.

default_filters:
  url_normalize:
    - match: '.html$'
      replace: '/'
      
rules:
  - url_prefix: 'com,mydomain)/'
    
    rewrite:
      fuzzy_lookup:
        - match: '.html'
          replace: '/'

It would be good to know if I'm in the right ballpark with how to resolve my issue.

Browser

I am running Chrome on Ubuntu, but I have tested on Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant