Remove inconsistently applied short URL patterns

https://rhymix.org/qna/1907191
This commit is contained in:
Kijin Sung 2025-05-21 14:47:17 +09:00
parent ad02de4f93
commit 3c741ec8bc
2 changed files with 1 additions and 6 deletions

View file

@ -60,11 +60,6 @@
<route route="$document_srl:int" priority="100" />
<route route="$document_srl:int/" priority="100" />
<route route="$document_srl:int/comment/$comment_srl:int" priority="100" />
<route route="$document_srl:int/page/$page:int" priority="100" />
<route route="category/$category:int/search/$search_target:word/$search_keyword:any" priority="60" />
<route route="category/$category:int/search/$search_target:word/$search_keyword:any/page/$page:int" priority="60" />
<route route="search/$search_target:word/$search_keyword:any" priority="50" />
<route route="search/$search_target:word/$search_keyword:any/page/$page:int" priority="50" />
<route route="category/$category:int" priority="40" />
<route route="category/$category:int/page/$page:int" priority="40" />
<route route="page/$page:int" priority="10" />

View file

@ -13,7 +13,7 @@
if (match && match[1] === window.current_mid) {
newpath = location.pathname.replace(/\/(comment|page)\/([0-9]+)$/, '');
}
if (location.pathname.match(/\/([0-9]+)$/) && location.search.match(/^\?category=[0-9]+$/)) {
if (location.pathname.match(/\/([0-9]+)$/) && location.search.match(/^\?(category|comment_srl|page)=[0-9]+$/)) {
newpath = newpath ? newpath : location.pathname;
}
if (newpath && location.hash && location.hash != '#') {