跳到正文
Skillpedia
部署与云(DevOps)75k · #2932

lowercase

它能做什么

这项技能检查网站的网址是否只使用小写字母,并确保大写版本会重定向到小写版本。适用于负责网站路由设置的网站所有者和开发者。

适用场景

  • ✓当你请智能体检查网站网址是否统一使用小写字母的时候。
  • ✓当你为新网站设置路由,并希望避免因大写字母产生重复页面的时候。
  • ✓当你发现含大写字母的页面没有重定向,需要永久重定向修复的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/lowercase/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/lowercase/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我确保网站所有网址都是小写,并把含大写字母的版本重定向过去。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会扫描链接和路由中的大写字母,然后设置服务器或框架,使网址统一为小写。它还会添加从旧的大小写混合网址到新地址的 301 重定向。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use lowercase URLs

Mixed-case URLs can create duplicate content—search engines may index both /Product and /product as separate pages, splitting link equity and diluting rankings.

Quick Reference

  • URLs should be entirely lowercase to prevent duplicate content issues
  • Most web servers treat /Page and /page as different URLs, creating duplicates
  • Redirect uppercase and mixed-case URLs to their lowercase equivalents with 301
  • Apply lowercasing in your server config or framework router, not ad hoc

Check

Scan the site's internal links and server-side routes for URLs containing uppercase letters. Check HTTP response codes for uppercase variants of key URLs to confirm whether they redirect (301) to lowercase.

Fix

Configure your server or framework to normalize all incoming URLs to lowercase before routing. Add 301 redirects from any existing uppercase URLs to their lowercase equivalents. Update internal links and sitemaps to use only lowercase URLs.

Explain

URL case matters for SEO because case-sensitive servers treat /Page and /page as different resources, creating duplicate content. Even on case-insensitive servers, inconsistency confuses crawlers and splits PageRank across URL variants.

Code Review

Scan the site's route definitions, server configuration, and internal links for uppercase letters in URL paths. Test key URLs in uppercase and mixed case — verify they return 301 to the lowercase version, not 200. Check the sitemap for any uppercase <loc> entries. Verify framework router is configured to normalize URL case.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/seo/lowercase

常见问题

为什么大写字母对 SEO 很重要?

有些服务器会把 /Page 和 /page 视为两个不同页面,这可能导致流量和搜索排名被分散。

应该通过代码还是手动设置?

这项技能建议通过服务器配置或框架路由器完成,而不是逐个修改网址。

内部链接怎么办?

这项技能建议更新内部链接和站点地图,使其只使用小写网址。

详情

作者的原始描述

Use when auditing URL structure or configuring a new site's routing. Applies to any server or framework that allows case-insensitive file systems (Linux servers are case-sensitive by default).

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2932
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能