I migrate magento2 windows system to linux system with database. Home page of magento2 is working fine but other page is give error 404 not found. If I add index.php in frontend url then it's opening but without it not possible. And also magento admin is also not opening even after adding index.php in url.

  • You should set RewriteBase in your .htaccess and make sure that your Linux server have mod_rewrite activated and proper options are set in Magento backend. But generally, it's server-side issue.
    – Lanius
    Commented Sep 4, 2015 at 9:27
  • i tried everything as you told but my problem is not solved yet Commented Sep 4, 2015 at 9:48

2 Answers 2


Did you see AllowOverride All? This is a commonly overlooked step. Please see:



The problem was in my Apache server configuration the below procedure helped me solving this problem

For Ubuntu edit the file /etc/apache2/apache2.conf (here we have an example of /var/www)

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted

and change it to;

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted


sudo service apache2 restart


  • Thanks, this worked for me also, before trying this i tried a lot of different stuff.
    – Mukesh
    Commented Jun 14, 2016 at 19:07

Your Answer

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

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