Drupal migration - now only front page works

2019-04-22 12:45发布

I just migrated a Drupal site from a ISP to a dedicated Linux CentOS server.

MySQL Database is configured and generates front page without error.

Problem is that only the home page works. All other pages show "404 Page Not Found Error".

So mysite.com/ works but mySite.com/node/1 does not work.

I checked some obvious places:

LoadModule rewrite_module modules/mod_rewrite.so is enabled in httpd.conf

Any ideas?

5条回答
孤傲高冷的网名
2楼-- · 2019-04-22 13:25

Check to see that the .htaccess file made it through the migration. Usually the culprit here. Can you get to mysite.com/?q=node/1?

查看更多
女痞
3楼-- · 2019-04-22 13:27

I've had this happen before. It could be because your new Linux Centos OS server isn't configured for clean URLs yet.

Try to access the site as follows. To login: http://example.com/?q=user/login

Login as admin and submit the form. You'll get access denied 404 page again after submission but still login.

Now manually type and go to http://example.com/?q=admin/settings/clean-urls

On this page turn off clean-urls and save and you should be able to access your site normally on the new server. Just configure it for clean-urls and then turn it back on when it's ready.

查看更多
\"骚年 ilove
4楼-- · 2019-04-22 13:29

Another possibility: If it's a new server, make sure that Apache has mod_rewrite installed. Happened to me.

查看更多
女痞
5楼-- · 2019-04-22 13:35

thanks Kevin,

mysite.com/?q=node/1? gives me a 404.

.htaccess was indeed missing. I copied in a generic version from a vanilla install into root directory (same directory as index.html) and this does not help.

(I don't have access to old site. We did not modify .htaccess - so I assume vanilla copy will do)

查看更多
放荡不羁爱自由
6楼-- · 2019-04-22 13:50

If you have drupal 7 or higher use this for the clean-url config page:

mysite.com/?q=admin/config/search/clean-urls

查看更多
登录 后发表回答