lowercase
它能做什么
这项技能检查网站的网址是否只使用小写字母,并确保大写版本会重定向到小写版本。适用于负责网站路由设置的网站所有者和开发者。
适用场景
- ✓当你请智能体检查网站网址是否统一使用小写字母的时候。
- ✓当你为新网站设置路由,并希望避免因大写字母产生重复页面的时候。
- ✓当你发现含大写字母的页面没有重定向,需要永久重定向修复的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/lowercase/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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.
常见问题
为什么大写字母对 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).
热度
- GitHub 星标
- 75k
- 排名
- #2932
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。