2

I have created a new Drupal 7 site at an address "http://www.mycms.com/customer". I am trying to move it to the production server at "http://www.customer.com". I backed up the database adn restored it on the "www.customer.com" MySQL server. I copied all the files from the "http://www.mycms.com/customer" folders. I cleared the cache_* tables in the database.

When I go to "http://www.customer.com", the home page is successfully displayed, but when I click any link on the home page, I get 1 "404 Not found" error. If I try to go to a page directly, e.g., "http://www.customer.com/node/15", the same error is displayed.

Additional info -

  1. The .htaccess file was copied from the appropriate subdirectory.

  2. There are no redirects in the .htaccess file

  3. When I attempt to login, I get the same error, so I cannot check any settings within the drupal database itself, except via phpAdmin.

Anybody have any ideas what to check next.

4

4 回答 4

1

为了清楚起见,听起来您正在将站点移动到不同的服务器(不仅仅是不同的 URL)?

如果移动到不同的服务器,我最初的想法是,如果 .htaccess 文件相同并且干净的 url 在新服务器上不起作用,那么需要调整的是 Apache 配置。你有其他网站在这个新服务器上工作吗?

AllowOverride All

需要在你的 httpd.conf 中设置一个。

于 2012-04-11T14:01:18.590 回答
1

阿列克谢是对的。解决了我的问题。在 httpd.conf 中,找到并启用 mod_rewrite。

LoadModule rewrite_module modules/mod_rewrite.so
于 2013-12-16T08:24:19.663 回答
0

似乎 mod_rewrite 已禁用。在您的客户服务器上创建一个文件,即 info.php,其内容为:

<?phpinfo();

然后从浏览器调用它。搜索“加载的模块”文本。它必须包含“mod_rewrite”(见下图)。

如果你想让干净的 urs 工作,你需要启用这个 apache 模块。

加载的模块图像

于 2012-04-11T15:15:55.347 回答
0

尝试删除当前的 .htaccess 文件,然后上传 drupal 附带的标准 .htaccess 文件。

于 2012-04-11T07:22:40.310 回答