Magento mod_rewrite 将 page.asp?query 重定向到index.php/product/
我们正在将客户从基于 ASP 的商店转移到 Magento,并希望将旧商店链接重写为新格式。我们正在更改域的 DNS,因此 Google 已索引的链接显然会在新商店中显示为 404。
老商店的格式是:page.asp?objectid=8&dataowner=webshopproduct&dataaction=showproduct&dataactionitem=1698&zcs=2
新商店的格式是:index.php/catalog/product/view/id/0000 /import-
我尝试过类似的操作:
RewriteCond %{QUERY_STRING} .showproduct。 RewriteRule ^index.php/catalog/product/view/id/0000/imported-([^/]*)$ page.asp?objectid=8&dataowner=webshopproduct&dataaction=showproduct&dataactionitem=$1&zcs=2
以及上面的变体,但我无法让它工作。
有什么想法吗?谢谢
We're moving a client from an ASP based shop, to Magento and would like to rewrite the old shop links to the new format. We're changing DNS for the domain, so links that Google has already indexed will turn up as 404 in the new shop obviously.
Format on the old shop is: page.asp?objectid=8&dataowner=webshopproduct&dataaction=showproduct&dataactionitem=1698&zcs=2
Format on the new shop is: index.php/catalog/product/view/id/0000/import-
I've tried something like:
RewriteCond %{QUERY_STRING} .showproduct.
RewriteRule ^index.php/catalog/product/view/id/0000/imported-([^/]*)$ page.asp?objectid=8&dataowner=webshopproduct&dataaction=showproduct&dataactionitem=$1&zcs=2
And variants of above, but I can't get it working.
Any ideas? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试遵循(如果您愿意,您可以扩展)
Htaccess 技巧
try following ( you can extend if you wish )
Htaccess Tricks