3

I have made a migration of my e-commerce magento site 1.9.1 Since I cannot access the admin as I used to.

Before admin url was www.mydomaine.com/admin. Now that gives an error 404 not found.

To reach admin I have to hit the URL: www.mydomaine.com/index.php/admin

Can someone help me to fix it as it was before.

Thanks in advance for your help.


Edit

So indeed I was missing the .htaccess and .htaccess.sample. Could not explain why they got cleared but they were not present.

So I imported them.

Now I get the following error: This page has a redirect loop. And I cannot access neither front or back end :(

So my side is offline....

Below I changed domain name by example.

mysql> select * from core_config_data where path='web/unsecure/base_url';
+-----------+---------+----------+-----------------------+-------------------------+
| config_id | scope   | scope_id | path                  | value                   |
+-----------+---------+----------+-----------------------+-------------------------+
|         9 | default |        0 | web/unsecure/base_url | http://www.example.com/ |
+-----------+---------+----------+-----------------------+-------------------------+
1 row in set (0.01 sec)
mysql> select * from core_config_data where path='web/secure/base_url';
+-----------+---------+----------+---------------------+-------------------------+
| config_id | scope   | scope_id | path                | value                   |
+-----------+---------+----------+---------------------+-------------------------+
|        10 | default |        0 | web/secure/base_url | http://www.example.com/ |
+-----------+---------+----------+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql> select * from core_config_data where path='web/url/redirect_to_base';
+-----------+---------+----------+--------------------------+-------+
| config_id | scope   | scope_id | path                     | value |
+-----------+---------+----------+--------------------------+-------+
|        73 | default |        0 | web/url/redirect_to_base | 1     |
+-----------+---------+----------+--------------------------+-------+
mysql> select * from core_config_data where path='web/seo/use_rewrites';
+-----------+---------+----------+----------------------+-------+
| config_id | scope   | scope_id | path                 | value |
+-----------+---------+----------+----------------------+-------+
|        74 | default |        0 | web/seo/use_rewrites | 0     |
+-----------+---------+----------+----------------------+-------+
1 row in set (0.00 sec)

I obviously run: rm -rf var/cache/* and rm -rf var/session/* I also restarted apache....

Any success.

  • Either you've lost your .htaccess file, corrupted it or Redirect has been disabled on your server. – Michael Jan 14 '16 at 5:27
  • Would you be able to tell me where is supposed to be placd in the hierarchie the .htaccess cause I am not able to see it. About Redirect I did that action without success on my server: sudo a2enmod rewrite – Gwenael Cholet Jan 14 '16 at 13:29
  • You should see it in your public folder – Michael Jan 14 '16 at 14:29
  • Please check my answer it explain how to solve your issue. – Matthéo Geoffray Jan 14 '16 at 14:33
  • But now I cannot access any page so I cannot do what is told in your post as he asks to connect to admin pages. – Gwenael Cholet Jan 14 '16 at 21:17
1

Better than a copy / paster here you can find the way to remove index.php from your URLs. You have to enable URL rewrite in Magento and your server.
https://stackoverflow.com/a/15504981/3531064

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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