Regex 从bigcartel链接到shopify产品的Mod重写
我需要将URL从Regex 从bigcartel链接到shopify产品的Mod重写,regex,.htaccess,mod-rewrite,Regex,.htaccess,Mod Rewrite,我需要将URL从/product/product\u-LINK重写为/products/product\u-LINK。如何将其放入.htaccess文件中?如果您只是想重定向,则可以使用mod_别名: RedirectMatch 301 ^/product/(.+)$ /products/$1 或mod_rewrite(如果您已经有重写规则,则首选此选项): RewriteRule ^product/(.+)$ /products/$1 [L,R=301]
/product/product\u-LINK
重写为/products/product\u-LINK
。如何将其放入.htaccess文件中?如果您只是想重定向,则可以使用mod_别名:
RedirectMatch 301 ^/product/(.+)$ /products/$1
或mod_rewrite(如果您已经有重写规则,则首选此选项):
RewriteRule ^product/(.+)$ /products/$1 [L,R=301]