level 1
hisay
楼主
为了使用伪静态,WP使用了 URL rewrite 但是刚开始定义了规则生成了些网页被搜索引擎记录了
我现在想更改新的规则,要想保留原来的页面,地址就转到新的规则页面。我看SEO 优化有这个样例,但是我更改不成功
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
以前是分类加post+时间+id.html路径类型
a.com/type1/type1sub/post/20120202/v102.html
a.com/type1/type1sub/post/20120202/v104.html
其中 post 和 v 就我手见自己加上的,
现在我想更改成
a.com/type1/type1sub/102.html
a.com/type1/type1sub/104.html
就是去掉中间 post/+时间/v 这些多余的路径
我在 RewriteRule . /index.php [L] 上一行加了一句
RewriteRule (.*)/post(.*)v(.*).html /$1/3.html 但是并没有起作用,不知道是哪里的错导致其他页面也不能正常访问了,请哪位高人指点吓吓。
2013年02月28日 14点02分
1
我现在想更改新的规则,要想保留原来的页面,地址就转到新的规则页面。我看SEO 优化有这个样例,但是我更改不成功
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
以前是分类加post+时间+id.html路径类型
a.com/type1/type1sub/post/20120202/v102.html
a.com/type1/type1sub/post/20120202/v104.html
其中 post 和 v 就我手见自己加上的,
现在我想更改成
a.com/type1/type1sub/102.html
a.com/type1/type1sub/104.html
就是去掉中间 post/+时间/v 这些多余的路径
我在 RewriteRule . /index.php [L] 上一行加了一句
RewriteRule (.*)/post(.*)v(.*).html /$1/3.html 但是并没有起作用,不知道是哪里的错导致其他页面也不能正常访问了,请哪位高人指点吓吓。