Virtuemart SEF:如何将 mod_rewrite 301 从 router.php 重定向到 Yagendoo 路由器
我正在将现有的电子商务网站 (Joomla 1.5 + Virtuemart) 从基本的 router.php SEF 迁移到 Yagendoo 路由器插件 (Virtuemart SEO SEF Links Pro)。问题是,两者创建了不同的 URL,并且我不想丢失当前列表,因此我想到创建一个 mod_rewrite 301 规则。
router.php url
http://hostname/it/home/category/<category ID>/<category name>
Yagendoo router url
http://hostname/it/<category name>
我想出了: RewriteRule ^it/home/category/(.*)$ it/$ [R=301,L] 这几乎是正确的,但仍然给了我之前的类别号名字。有谁知道我如何删除该号码但仍保留之后出现的内容?
预先感谢您的任何帮助。
I'm migrating an existing ecommerce site (Joomla 1.5 + Virtuemart) from basic router.php SEF to Yagendoo router plugin (Virtuemart SEO SEF Links Pro). The problem is, the two create different URLs and I don't want to lose current listings, so I thought of creating a mod_rewrite 301 rule.
router.php url
http://hostname/it/home/category/<category ID>/<category name>
Yagendoo router url
http://hostname/it/<category name>
I've come up with: RewriteRule ^it/home/category/(.*)$ it/$ [R=301,L] which is almost correct, but still gives me the category number before the name. Does anyone know how I can remove the number but still keep whatever comes afterwards?
Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这样的事情。
RewriteRule ^it/home/category/([^/]+)/([^/]+)$ it/$2 [R=301,L]
我没有检查它,但它是很容易根据您的目的对其进行定制。主要思想是将 和 存储在不同的变量中($1,$2)。
Try something like this.
RewriteRule ^it/home/category/([^/]+)/([^/]+)$ it/$2 [R=301,L]
I did not chek it, but it is pretty easy to customize it for your purposes. The main idea is storing and in different variables($1, $2).