【发布时间】:2012-02-06 15:32:02
【问题描述】:
我希望 301 将 URL 从不再使用的旧版本网站重定向到在全新 Drupal 安装中创建的新 URL。
旧网址:/198/our-software/
新网址:/services/software-development/
在位于 Drupal 根目录的 .htaccess 中,我添加了以下内容:
redirect 301 /198/our-software/ http://www.domain.com/services/software-development
重定向在某种程度上是有效的,它将用户发送到如下所示的 url,并在其末尾附加了一个查询字符串,这会导致 404 错误:
http://www.domain.com/services/software-development?q=198/our-software/
我尝试将重定向放在 .htaccess 文件的开头和结尾都导致 404 page not found 错误。
我是否需要使用更复杂的重定向来绕过 Drupal URL 重写?
注意:我正在使用 Pathauto 模块。
【问题讨论】: