RGJ
(Richard - Communiteq)
18 مايو 2021، 7:43م
1
It seems like URL’s to user profiles are not case sensitive.
For instance https://meta.discourse.org/u/DiscObOt works just as well as https://meta.discourse.org/u/discobot
But the canonical URL in the first variation is not canonicalized into the ‘official’ case of the username, possibly leading to duplicate content issues or the wrong variation being indexed.
So the canonical URL of the first variation is:
<link rel="canonical" href="https://meta.discourse.org/u/DiscObOt" />
while it should be
<link rel="canonical" href="https://meta.discourse.org/u/discobot" />
leading to the ‘correctly’ spelled variant.
6 إعجابات
Hmm is this an issue in practice?
إعجاب واحد (1)
sam
(Sam Saffron)
20 مايو 2021، 5:40ص
3
I don’t think it is … but it is kind of odd that we allow:
https://meta.discourse.org/u/codinghorror
https://meta.discourse.org/u/codinghorrOr
https://meta.discourse.org/u/cOdinghorror
We should normalize the username to lowercase username and force a redirect for the various obscure mis-cased usages similar to how we normalize topic urls / category urls.
I guess the same normalization should hold for https://meta.discourse.org/g/Admins
We already perform normalization using a redirect for https://meta.discourse.org/c/Bug/1/l/unread and https://meta.discourse.org/t/incorrect-canonical-url-for-user-profile-PAGE/190847
Low priority but we should clean this up.
Changing this to feature though cause nothing is really broken, it is just odd and inconsistent.
4 إعجابات
Sure perhaps @andrei could add to his list? this one seems easy and high reward for low risk?
إعجابَين (2)
andrei
(Andrei Prigorshnev)
20 مايو 2021، 6:59م
5
I’m adding this to my list with low priority.
3 إعجابات
أنا أيضًا مع تنظيف هذا الأمر..
ستلاحظ أيضًا أن كل رابط من هذه الروابط له رابط أساسي مختلف يشير إلى نفسه. (ذكره @RGJ بالفعل)
صحيح، أتخيل أنه يجب أن يكون نفس الشيء بالنسبة لروابط المستخدمين، أو على الأقل يجب أن تشترك جميع هذه الروابط في نفس الرابط الأساسي.
أود أيضًا أن أضيف أن عناوين URL للعلامات تظهر سلوكًا مشابهًا.
حيث أن عناوين URL للعلامات ليست “موحدة حسب حالة الأحرف” (إذا كان هذا هو المصطلح الصحيح).
لذلك كلاهما
https://meta.discourse.org/tag/Official
و
https://meta.discourse.org/tag/official
يذهبان إلى نفس المكان ولكنهما يحتويان على روابط مرجعية ذاتية بدلاً من مجرد النسخة ذات الأحرف الصغيرة.
إعجاب واحد (1)