1
我已經構建了一個自定義的WordPress主題,顯示主頁中模式的帖子。RedirectMatch example.com/post-slug to example.com/post/post-slug
我需要重定向從
http://example.com/my-post-slug
到
http://example.com/post/my-post-slug
我試圖找出RedirectMatch,但沒有運氣。到目前爲止,我試過這個,但它只是導致一個無限循環:
RedirectMatch 301 ^/(.*)$ /post/$1
任何幫助,將不勝感激。
這是重定向我的靜態首頁。 'example.com'轉到'example.com/post/index.php'並且它顯示'太多重定向' – pmandell
在完全清除瀏覽器緩存後嘗試更新規則。 – anubhava
它的工作原理!非常感謝。 – pmandell