Skip to content
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

Add functionality for detecting candiates with same start path #9

Open
sypets opened this issue Nov 17, 2021 · 0 comments
Open

Add functionality for detecting candiates with same start path #9

sypets opened this issue Nov 17, 2021 · 0 comments

Comments

@sypets
Copy link
Owner

sypets commented Nov 17, 2021

Find algorithm for suggestion of massive number of redirects with same start path - candidates for creating a regex in webserver config?

E.g. a top level page was renamend and many subpages have the same rename, e.g. study => studies. This might be a candidate for a redirect with regex in webserver config.

# start path
select REGEXP_REPLACE(source_path,'^(/[^/]*)(/.*)?$', '\\1') as p1,count(*) as c from sys_redirect group by p1 order by c;

result: (example)

| /hit                                                   |  36 |
| /lehre                                                 |  38 |
| /c3l                                                   |  50 |
| /beruf-karriere                                        |  52 |
| /test                                                  |  55 |
| /icbm                                                  |  62 |
| /materiellekultur                                      | 228 |
| /en                                                    | 490 |
+--------------------------------------------------------+-----+

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