1
這裏最後的斜線重定向在我的.htaccess文件中的代碼,我現在所擁有的:htaccess的通配符重定向不與域名
RewriteEngine on
RewriteCond %{HTTP_HOST} ^centerforpolicyanalysis.org$ [OR]
RewriteCond %{HTTP_HOST} ^www.centerforpolicyanalysis.org$
RewriteRule ^(.*)$ "http\:\/\/www\.equalhealth\.info$1" [R=301,L]
我想重定向大家誰訪問http://(www.)centerforpolicyanalysis.org到http://www.equalhealth.info
它工作正常,如果這是你在網址中輸入的所有內容,但是如果你輸入一個子目錄,它就會失敗。
這裏就是我得到: I型
http://www.centerforpolicyanalysis.org/index.php/2011/06/recommendations-for-preventive-services-to-women-and-girls/
,我得到
http://www.equalhealth.infoindex.php/2011/06/recommendations-for-preventive-services-to-women-and-girls/
而且它打破。我如何獲得它保留在重定向的域名後面的斜槓?
完美。正是我所需要的。謝謝。 – codescribblr 2012-04-26 18:15:36