0
我的目標是創建一個永久重定向.htaccess如何通過修改char來創建RedirectPermanent?
http://example.com/category-/list/town/id/id2/country
到 http://example.com/category/list/town/id/id2/country
(除去最後的 ' - ' 從類別字符(如果存在)
問候
我的目標是創建一個永久重定向.htaccess如何通過修改char來創建RedirectPermanent?
http://example.com/category-/list/town/id/id2/country
到 http://example.com/category/list/town/id/id2/country
(除去最後的 ' - ' 從類別字符(如果存在)
問候
你可以在你的根目錄下使用這條規則.htaccess:
RedirectMatch 301 ^/(.*?)-/(.*)$ /$1/$2