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 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥15 树莓派5怎么用camera module 3啊
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事: