I had a magento website abc.com and now migrated all files and database to xyz.com.
After changing database and url path, the xyz.com is displaying the same home page(front-page). But, when you click on any product or page in home page or go to Admin Login url:

Not Found

The requested URL /admin was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Need your help.

  • Which web service you use? There is .htaccess file for Apache? Dec 18, 2016 at 5:57
  • no .htaccess Sir Dec 18, 2016 at 6:10
  • You should copy the .htaccess from your old site to the new site. Dec 18, 2016 at 6:11
  • I did Sir but still problem can't access dashboard cant accces any produict or page only front-page(hame page) is showing Dec 18, 2016 at 6:16
  • Try to flush Magento cache and try again. Dec 18, 2016 at 6:18

2 Answers 2


Looks like url_revrite module does not enable on the new server.

see more detail in http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache.html#enable-rewrites-and-htaccess-for-apache-24

  • url_revrite module is enabled by default from my hosting as I am using dedicated hosting Dec 18, 2016 at 7:09


go to below configuration in admin

Stores -> Configurations -> General ->Web -> Search Engine Optimization -> Use Web Server Rewrites

and disable "Use Web Server Rewrites".


run below command from ssh

php bin/magento config:set web/seo/use_rewrites 0 
php bin/magento cache:clean

if it works for you that mean php rewrite module is disabled on your server

hope this helps you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.