<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogging &#8211; 任平生</title>
	<atom:link href="https://rpsh.net/tag/blogging/feed/" rel="self" type="application/rss+xml" />
	<link>https://rpsh.net</link>
	<description>待从头</description>
	<lastBuildDate>Tue, 18 May 2010 03:02:43 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.2</generator>
	<item>
		<title>移除 WordPress 分类链接的前缀</title>
		<link>https://rpsh.net/archives/remove-the-category-prefix-from-permalinks-on-wordpress/</link>
					<comments>https://rpsh.net/archives/remove-the-category-prefix-from-permalinks-on-wordpress/#comments</comments>
		
		<dc:creator><![CDATA[任平生]]></dc:creator>
		<pubDate>Sun, 01 Mar 2009 12:00:23 +0000</pubDate>
				<category><![CDATA[技术分享]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[原创]]></category>
		<guid isPermaLink="false">http://rpsh.net/?p=227</guid>

					<description><![CDATA[移除 WordPress 分类 固定链接中的category前缀。方法非常简单：WordPress后台管理 - 设置 - 永久链接（固定链接）-分类目录前缀，填入一个英文的点号即可]]></description>
										<content:encoded><![CDATA[<p>最近帮人修改Blog时，分类链接要求是这样子：</p>
<pre>https://rpsh.net/google/</pre>
<p>但默认的为：</p>
<pre>https://rpsh.net/category/google/</pre>
<p><span id="more-227"></span></p>
<p>WP会自动给分类的 URL 添加一个category 的前缀，在 WP 后台的固定连接中只能设置修改这个前缀 category 为其他字符，却不能隐藏这个前缀。</p>
<p>Google 了一下这个问题，中文的文章只有<a href="http://www.cciuu.com/html/remove-prefix-from-url-for-a-wordpress-category.html" target="_blank" class="external">一</a>篇，不过提供的方法我用后却无效， category 是移除了，但分类链接却变成了</p>
<pre>https://rpsh.net/?cat=1</pre>
<p>这不是我想要的，用英文关键字搜了一下，找到一篇有价值的<a href="http://www.clausheinrich.com/change-or-remove-the-category-from-your-permalinks-on-a-wordpress-blog/" target="_blank" class="external">文章</a>，提供的解决这个问题的方法也异常简单：</p>
<p>WordPress后台管理 &#8211; 设置 &#8211; 永久链接（固定链接），在“分类目录前缀”里填入一个点[ . ](只一个点，不含括号)即可完美<a href="https://rpsh.net/archives/remove-the-category-prefix-from-permalinks-on-wordpress/">移除分类链接中的前缀</a>。</p>
<p><img decoding="async" alt="移除WordPress分类链接的前缀" src="http://lh3.ggpht.com/_aLmNmqD0H4M/SapzE3CRH2I/AAAAAAAAArY/4UmTlyCkumY/s800/remove_category_prefix.png" width="546" height="185"/> </p>
<p>原文中说的是填入[ /. ]，不过保存后斜杠会被自动删除，而且经我测试，直接填一个点就行了。</p>
<p>原文中还提到说这是 2.5 以后版本 WordPress 分类的一个特性。至于之前版本的 WP 是否支持，我不清楚，我目前用的是 2.7，可正常使用这一技巧。</p>
<p>p.s. 我不需要这种效果，所以本Blog的分类链接依然是含有category前缀的  <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f633.png" alt="😳" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://rpsh.net/archives/remove-the-category-prefix-from-permalinks-on-wordpress/feed/</wfw:commentRss>
			<slash:comments>65</slash:comments>
		
		
			</item>
	</channel>
</rss>
