dsxsou8465 2013-11-28 08:23
浏览 61
已采纳

如何在drupal中将非www重定向到www url

Hi I faced a problem in Drupal CMS. I browse online but i not found any result about this. In different places we read that open .htaccess file and uncomment the following lines by removine hash tag from start but this is not working please help me out.

# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  • 写回答

4条回答 默认 最新

  • 普通网友 2013-11-28 09:57
    关注

    You may have Windows shared hosting most probably. I saw many Windows shared hosting services don't give you access to the Mod_Rewrite functions. If this is true so please ask your hosting provider to help you out in this. Once they done with that then uncomment the code.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)