English 中文(简体)
.htaccess Permalink 重定向
原标题:.htaccess Permalink redirect

我想把我的Wordpress文章从 /% 标题/% 调整到% 年/月/% 标题/% 。

既然WP在做新的永久链接结构时自动调整页面方向, 我想在我的.htaccess 文件中重新定位, 让Google知道变化 。

这是我在我的.htaccess档案里有的, 所以我想确认一下,这是正确的结构:

redirectMatch 301 > http://url-example.com/$3 /([0-9]{4})/([0-9]{2})/(.*)$

让我知道,谢谢。

最佳回答

由于WordPress URLs的动态性质, 我不认为你会在一条规则下 成功完成这个任务。

您可以在 .htaccess 中明确列出这些内容。 但是, 可能WordPress正在为 Google (即 301) 正确处理这些重定向 。

使用 Firebug 或 HTTP 活页页眉校验 。

问题回答

暂无回答




相关问题
Ignore symlinks in clean URL s in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. ...

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on ...

Mod Rewrite ignoring -d

After a day or two, I am still fighting with Mod Rewrite. It seems that 60% of my development time is spent battling the server. My current URL structure is such that all http://example.com/xyz and ...

ErrorDocument 404 Not Sending Referrer Information: PHP

I m using a standard htaccess ErrorDocument 404 to redirect users to a new page. In order to customize the 404, I need to know their referrer information (from the page they Tried to visit). $...

Find all htaccess files on server [closed]

I m looking for a Linux command to go through all the directories on my server and find all .htaccess files. The output would be a list of all those files with full path, creation/modification date ...

301 Redirect Help with Dynamic URL s and Multiple Id s

I just did a redesign for www.wildchildclothes.com which has a new URL structure. The old site ran on Zen Cart and had a bad URL structure. Here are some examples of what I want to redirect from: OLD:...

热门标签