2011-10-31 127 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