.htaccess htaccess中路径301重定向存在问题

.htaccess htaccess中路径301重定向存在问题,.htaccess,redirect,.htaccess,Redirect,我们正在尝试重定向一组类别URL,如下所示: Redirect 301 /table/ https://www.example.com/abc/ Redirect 301 /table/accessoires/ https://www.example.com/def/ Redirect 301 /table/accessoires/tablecloth/ https://www.example.com/ghj/ 第一个重定向工作正常。但是为什么其他两个不起作用呢?顺序很重要。首先应该制定更具体

我们正在尝试重定向一组类别URL,如下所示:

Redirect 301 /table/ https://www.example.com/abc/
Redirect 301 /table/accessoires/ https://www.example.com/def/
Redirect 301 /table/accessoires/tablecloth/ https://www.example.com/ghj/

第一个重定向工作正常。但是为什么其他两个不起作用呢?

顺序很重要。首先应该制定更具体的规则

Redirect 301 /table/accessoires/tablecloth/ https://www.example.com/ghj/
Redirect 301 /table/accessoires/ https://www.example.com/def
Redirect 301 /table/ https://www.example.com/abc/