我已將網站從joomla轉移到wordpress。最老的鏈接已被改得很好,但我得到一些奇怪的404使用正則表達式替換/重定向到.htaccess
我想什麼是能夠給這個重定向:
http://www.pcsteps.gr/component/content/article?id=575:how-to-guide-wireless-network-security
爲了這個:http://www.pcsteps.gr/575-how-to-guide-wireless-network-security
這是我已經使用.htaccess文件內的代碼:
RewriteRule ^component/content/(.+)$ pcsteps.gr/$1 [R=301,L]
此代碼除去/部件/ content /部分URL,但我留下了「article?id = 575:how-to-guide-wireless-network-security」
如何更改代碼以刪除「article?id =「,保留數字並用」 - 「替換」:「?
那你嘗試成功刪除「/組件/內容/」爲什麼不會刪除它的休息嗎? – OGHaza
RewriteRule^component/content /(.+)$ http://www.pcsteps.gr/$1 [R = 301,L]會刪除它們,但我會留下「article?id = 575:how-指導無線網絡安全「 –