使用Coldfusion URL重定向HTAccess 301问题

时间:2014-11-13 17:01:41

标签: .htaccess redirect coldfusion http-status-code-301

我们的网络团队最近重建了Coldfusion网站,现在正在设置重定向。

主广告资源的第一次重定向工作正常,但当我尝试重定向每个广告时,就像第二次重定向一样,重定向到http://domain.com/inventory/pre-owned.php/make/carmake/

基本上,第一个重定向覆盖了第二个重定向并替换了URL的那一部分。

我认为文件index.cfm是截止点可能是一个问题。

Redirect 301 /folder/index.cfm http://domain.com/inventory/pre-owned.php
Redirect 301 /folder/index.cfm/make/carmake/ http://domain.com/inventory/pre-owned.php?sort=&make=Make&model=&year=

有没有办法让一个重定向优先于另一个或解决这个问题?

谢谢!

编辑:我可以发誓昨天下面的答案,但现在不行。

奇怪的是,我还有另外两行:

Redirect 301 /new/index.cfm/page/testdrive/ http://domain.com/info/schedule-test-drive.php
Redirect 301 /new/index.cfm http://domain.com/inventory/new.php

这些工作完美无缺。

1 个答案:

答案 0 :(得分:2)

重新安排你的规则:

Redirect 301 /folder/index.cfm/make/carmake/ /inventory/pre-owned.php?sort=&make=Make&model=&year=

Redirect 301 /folder/index.cfm /inventory/pre-owned.php
相关问题