douyi9705 2014-10-07 06:26
浏览 61
已采纳

终极SEO模块+ htaccess 301 .html重定向问题

I have successfully installed the Ultimate_SEO_URLs_v2.103 to my shopping cart installation (which is v1.36).

We are getting ready to go live with the site but I need to redirect html pages that are indexed by google to the new html page names.

The problem that I am having is trying to redirect pages with .html extensions to the page names that are rewritten by the htaccess file fromUltimate SEO URL.

It works if I use .htm page for the original page and redirect to the new counterpart page.

Here is the code I am using in .htaccess file (after Ultimate SEO rewrite code):

redirect 301 /old_conditions.html domain.com/conditions.html

so if you go to http://domain.com/old_conditions.html I want it to redirect to http://domain.com/conditions.html

It doesn't work, it goes to the page can not be found page!

Can someone please help me figure out why I can't get a redirect from a .html page when using the Ultimate SEO URL module?

Thanks in Advance!

  • 写回答

1条回答 默认 最新

  • dongrao9454 2014-10-07 06:28
    关注

    You can use this rule in your root .htaccess using RewriteRule directive:

    RewriteRule ^44-wholesale-celosia\.html$ /flowers/celosia.html [L,NC,R=301]
    

    Also make sure this rule is right at top just below RewriteBase / line.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分