我在以下结构中有一个URL
http://www.naturaflowers.com/100-fresh-cut-wholesale-flowers.html
我想重写URL
http://www.naturaflowers.com/fresh-cut-wholesale-flowers.html
我们使用“终极SEO url插件”来生成SEO友好的URL . 旧的URL结构是/index.php?main_page=index&cPath=category_id . 我的htaccess代码如下:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)-(.*).html$ index\.php?main_page=index&cPath=$1&%{QUERY_STRING} [L]
上面提到的插件和这个htaccess代码重写index.php?main_page = index&cPath = 100到/100-fresh-cut-wholesale-flowers.html . 现在我想通过htaccess将/100-fresh-cut-wholesale-flowers.html重写到我网站的所有地方/fresh-cut-wholesale-flowers.html .
2 回答
你有这样的规则: