2011-10-31 129 views
1

我有這個page,如果您滾動到頁面的中間,你會看到許多環節,所有有像例如htaccess的刪除的網址

http://healingstreamsusa.org/healing/healing/good-grief.html 
http://healingstreamsusa.org/healing/healing/forgiveness-not-option.html 

重名正如你可以看到有重複的名字是兩個治療/癒合,而不是一個治療/所以這些網址都破了,有很多站點範圍...客戶端使所有的網址相對而不是絕對的,現在他需要一個htaccess來刪除中間的重複。 ...這是我有什麼,它不做重定向,因爲我的預期....我缺少的東西

RewriteCond %(REQUEST_URI) ^/healing/healing[/]? 
RewriteRule (.*) http://healingstreamsusa.org/healing? [R=301,L] 

試過所有這些.....

RewriteRule /about/about/(.+)$ /about/$1 [R=301] 
RewriteRule /about/images/(.+)$ /images/$1 [R=301] 
RewriteRule /healing/images/stories/(.+)$ /images/stories/$1 [R=301] 
RewriteRule /healing/healing/(.+)$ /healing/$1 [R=301] 
RewriteRule ^healing/healing/([^/]*)$ /healing/$1 

知道爲什麼這是行不通的....

+0

修復頁面,不添加愚蠢htaccess的規則做毫無價值任務這不應該存在於第一位。 – animuson

+0

它不是我的電話....客戶想要的...... – Trace

+0

它的許多頁面...不只是這一個...他們只是想快速修復 – Trace

回答

0
RewriteEngine On 
RewriteRule ^healing/healing/([^/]*)$ healing/$1 
RewriteRule ^about/about/([^/]*) about/$1 
+0

我試過了,並更新了我的問題與他人,但仍然沒有什麼.... – Trace

+0

@譚你必須爲每一個創建一個規則! – undone