What is misconfigured when Drupal homepage works ok, but all links fail?

have recently renamed the root folder of a development Drupal site from:

www.example.com/foo/

to

www.example.com/bar/

The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base_url in sites/default/settings.php to the new filesystem path. As a result, The homepage works just fine, and all hyperlinks on the homepage go where they should ( example.com/bar/content/ ). Unfortunately, clicking on any the hyperlinks sends me to an error page:

Not Found
The requested URL /foo/index.php was not found on this server.

This looks like a misconfiguration, but all sources I can see only site the .htaccess file and $base_url as possible points of failure. What else should I be checking? Thanks.


以下是解决方法

Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.

Old configuration:

# RewriteBase /foo

New configuration:

RewriteBase /bar

Note that if 'foo' was a default directory name, such as 'drupal' or 'acquia', you will need to uncomment the RewriteBase line and modify it to match your new (nondefault) directory name. This was the case for me, so I didn't even think to check this aspect.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值