2013-09-23 29 views

回答

0

一種方法是使用WP_Rewrite但沒有壓倒一切的基本路徑(/blog),因爲它是在生成.htaccess文件RewriteBase /blog/規則的方式。 所以,要麼去除基本路徑,並使用WP_Rewrite重新添加或手動編輯.htaccess和重寫它的RewriteBase指令之前:

... 
RewriteBase/
RewriteRule ^/blog/portfolio/(.*)$ http://example.com/portfolio/$1 [R=301,L] 
RewriteBase /blog/ 
... 

但我不會鼓勵這種爲WordPress的覆蓋未來的更改您提交永久鏈接管理員表單時。

長話短說:刪除那/blog/ basepath。如果您不知道如何使用WP_Rewrite,那麼您可以使用blogslug參數註冊一個名爲「Blog Post」的新自定義帖子類型,並使用它們代替默認的「Posts」。

相關問題