2017-07-17 36 views
0

我們將example1.com重定向到example2.com - 此工作(也強制ssl)。重寫無效後重定向

但是我們有很多example1.com/dir/subdirectory形式的鏈接,需要轉到example2.com/dir/differentsubdirectory。

Redirect "/skill-catalog" "/catalog" 

and 

RewriteRule ^/home/skill-catalog/(.*)$ /home/catalog/$1 [R,L] 

我已經嘗試過每一個都沒有工作。我做錯了什麼,或者我錯過了他們需要的順序?也可以在htacess file for wordpress中更容易做到這一點,或者我目前正在做什麼 - 在httpd conf文件中?

回答

0

嘗試以下規則:

RewriteRule ^/home/skill-catalog/(.*)$ https://example2.com/home/catalog/$1 [R,L] 
+0

這沒有奏效。在我們的主要doman/ssl重定向之前和之後嘗試了此操作。 – blankip

+1

你能分享.htaccess的完整內容嗎? –