【问题标题】:Redirect old permalinks (page_id=x) wordpress重定向旧的永久链接(page_id=x)wordpress
【发布时间】:2010-11-24 14:18:23
【问题描述】:
【问题讨论】:
标签:
wordpress
mod-rewrite
permalinks
【解决方案1】:
找到了。也许不是书中最好的技巧,但这里有:
RewriteRule /(.*)?page_id=3(.*) /company_profile [L,I,RP]
我的完整 httpd.ini 文件现在是:
[ISAPI_Rewrite]
RewriteEngine On
RewriteBase /
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
# For special Wordpress folders (e.g. theme, admin, etc.)
RewriteRule /wp-(.*) /wp-$1 [L]
RewriteRule /google(.*) /google$1 [L]
#Rewrites for permanently moved pages (page_id=x):
RewriteRule /(.*)?page_id=3(.*) /company_profile [L,I,RP]
# For all Wordpress pages
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]
希望这对某人有所帮助!