Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess Magento 301 htacess重定向根本不起作用_.htaccess_Magento - Fatal编程技术网

.htaccess Magento 301 htacess重定向根本不起作用

.htaccess Magento 301 htacess重定向根本不起作用,.htaccess,magento,.htaccess,Magento,我正在写一个301重定向通过htaccess重定向旧流量到新的网址 前任 我有旧的网址 我需要将此请求重定向到 所以我在magento HttpAccess上写了如下代码 Redirect 301 http://www.thebedroom.com.au/catalogue/accessories/product134 http://www.thebedroom.com.au/melbourne-demons-bean-bag-cover.html 不走运 也试过了 Redirect 30

我正在写一个301重定向通过htaccess重定向旧流量到新的网址 前任 我有旧的网址

我需要将此请求重定向到

所以我在magento HttpAccess上写了如下代码

Redirect 301 http://www.thebedroom.com.au/catalogue/accessories/product134 http://www.thebedroom.com.au/melbourne-demons-bean-bag-cover.html
不走运

也试过了

Redirect 301 ^accessories/product134 http://www.thebedroom.com.au/melbourne-demons-bean-bag-cover.html
但这并不是重定向,而是在浏览器窗口上显示相同的url

有人知道这里有什么问题吗

谢谢

试试:

Redirect 301 /catalogue/accessories/product134 http://www.thebedroom.com.au/melbourne-demons-bean-bag-cover.html

如果URI中有
product134
的任何实例,它将重定向

RedirectMatch 301 product134 http://www.thebedroom.com.au/melbourne-demons-bean-bag-cover.html