Mod rewrite RewriteCond和RewriteRule 301重定向oscommerce htaccess

Mod rewrite RewriteCond和RewriteRule 301重定向oscommerce htaccess,mod-rewrite,Mod Rewrite,我有重复的网址 第一个URL 第二个URL 什么是.htaccess条目,第一个url中的所有url都将被301重定向到第二个url 非常感谢您的帮助您可以尝试使用mod_别名(重定向/重定向匹配)或mod_重写(重写规则)。如果你已经在某个地方有了重写规则,你可能只想坚持使用mod_rewrite,否则可能会有冲突 mod_别名: Redirect 301 /product_info.php/cPath/ /product_info.php/ 修改: RewriteEngine On Re

我有重复的网址

第一个URL

第二个URL

什么是.htaccess条目,第一个url中的所有url都将被301重定向到第二个url


非常感谢您的帮助

您可以尝试使用mod_别名(重定向/重定向匹配)或mod_重写(重写规则)。如果你已经在某个地方有了重写规则,你可能只想坚持使用mod_rewrite,否则可能会有冲突

mod_别名:

Redirect 301 /product_info.php/cPath/ /product_info.php/
修改:

RewriteEngine On
RewriteRule ^/?product_info.php/cPath/(.*)$ /product_info.php/$1 [L,R=301]