How to rename the node and file

本文指导如何改进网站URL,遵循简洁、明确的原则,避免冗长和无意义的编号,确保唯一且利于搜索引擎理解。通过标准命名和转换工具,提升页面主题识别度和Google流量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I found that many nodes and files (Img, Video, PDF) names of the local websites do not conform to the naming standard.

These node and file names are part of the URLs. The URL is what the Web browser displays in the address bar.

Using standard URLs will help improve ranking and traffic from Google.

Create a standard URL (refer to https://moz.com/learn/seo/url)

  1. URLs should be definitive but concise. By seeing only the URL, the user (and search engine) can understand the topic of the page.

  2. Create unique titles, avoid creating duplicate content, and don’t use meaningless numbers and dates.

  3. Use English lowercase letters and hyphens(-) to separate words. URLs should not use underscores, spaces, or any other characters to separate words.

Attached are operation documents and conversion tool (Automatically converts Spaces and underscores to hyphens(-) and uppercase to lowercase)

我发现国家网站的很多节点名和文件(Img, Video, PDF)名不符合命名规则。

这些节点和文件名是URL的一部分。Web浏览器在地址栏中显示的就是URL。

使用标准的URL将有助于提高谷歌的排名和流量。

创建一个标准的URL

  1. url应该是明确而简洁的。通过只看到URL,用户(和搜索引擎)就可以明白网页的主题内容。

  2. 创建独特的标题,避免创建重复的内容,也不要使用无意义的数字和日期。

  3. 单词之间用英文小写字母和连字符(-)隔开。url不应该使用下划线、空格或任何其他字符来分隔单词。

附件是网站节点、文件重命名操作说明和转换工具 (自动将空格和下划线转换为连字符(-)以及大写转换为小写)

Standard URLs

Un-standard URLs

Sentences are too long

Meaningless numbers and dates Abbreviations

convert-spaces

<html lang="en">
    <meta charset="utf-8">
    <head>
		<title>Spaces are converted to bars</title>
    </head>
    <body>
		<div><h2>Spaces in English sentences are converted to bars</h2></div>
		<div>
			<input id="uin" type="text" name="uin" size="80" />&nbsp;&nbsp;&nbsp;
			<button onclick="return convertr();">submit</button>
		</div>
	    <br/>
		<div id="jieguo"></div><br/>
		<button onClick="copyr();">copy</button>
	  
		<script>
			function convertr() {
				var x = document.getElementById("uin").value;
				var params=x.replace(/[\s_]/g, "-");				
				params = params.toLowerCase();
				document.getElementById("jieguo").innerHTML = params;
		}
		</script>
		<script>
			function copyr() {
				var x = document.getElementById("jieguo");
				// x.select();
				//document.execCommand("Copy");
				copy_data(x);
				//alert("Ready to use.");
			}
			function copy_data(containerid) {
				var range = document.createRange();
				range.selectNode(containerid); //changed here
				window.getSelection().removeAllRanges(); 
				window.getSelection().addRange(range); 
				document.execCommand("copy");
				window.getSelection().removeAllRanges();
				//alert("data copied");
				}
		</script>
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值