我想在magento中重定向url。我正在使用“URL重写管理”。
我们希望此路径“/index.php?cPath=1”重定向到“baby-prams-strollers.html”此路径。
我输入了此类型的数据
Request Path * index.php?cPath=1
Target Path baby-prams-strollers.html
但它将在主页上重定向。我们想重定向baby-prams-strollers.html这条路。我们应该怎么做?请指教我。
如果我们输入了此类数据
Request Path * ?cPath=1
Target Path baby-prams-strollers.html
现在它将被重定向到“baby-prams-strollers.html”这条路径,但url随附index.php / baby-prams-strollers.html。现在我们在URL中不需要index.php。我们如何删除此URL中的index.php。我们已经删除了所有网址中的index.php。但是当我们重定向这个类型的url时,它会在index.php中添加url。
提前致谢。
答案 0 :(得分:0)
您需要在Magento根文件夹中添加.htaccess文件,如下所示:
RedirectMatch 301 /index.php?cPath=1(.*) /baby-prams-strollers.html$1