1

I am facing some wired issue after importing my database file. After importing when I try to access my admin login page(http://example.com/admin) its redirection to 404 error and url is changing (https://example.com.com/index.php/index.php/admin).

I checked all the answer related admin url redirecting 404 issue but I am not able solve this one.

Am I missing any data after importing database? because I checked this link may I need to add those mysql code in my sql file before importing.

Please help me guys? I am lost.:(

Update: output of query: select * from core_config_data where path like 'web%secure/base_url';

+-----------+----------+----------+-----------------------+------------------+
| config_id | scope    | scope_id | path                  | value            |
+-----------+----------+----------+-----------------------+------------------+
|         8 | default  |        0 | web/unsecure/base_url | {{base_url}}     |
|        13 | default  |        0 | web/secure/base_url   | {{base_url}}     |
|      1511 | websites |        1 | web/secure/base_url   | http://example.com/  |
|      1513 | websites |        1 | web/unsecure/base_url | http://example.com/  |
|      1518 | stores   |       17 | web/unsecure/base_url | https://example.com/ |
|      1519 | stores   |       17 | web/secure/base_url   | https://example.com/ |
|      1520 | stores   |        1 | web/unsecure/base_url | https://example.com/ |
|      1521 | stores   |        1 | web/secure/base_url   | https://example.com/ |
+-----------+----------+----------+-----------------------+------------------+
3
  • Can you provide the output of the following query: select * from core_config_data where path like 'web%secure/base_url'; Commented Oct 28, 2015 at 13:58
  • @LukeRodgers, I have added the output. I am having multi store architecture
    – Charlie
    Commented Oct 29, 2015 at 4:49
  • Hmm. I'd give it a go and change config_id=13 to be https://example.com/. Don't forget the trailing slash! Let me know how it works out. Commented Oct 29, 2015 at 9:19

1 Answer 1

0

For automatically applying of admin store view, you need to create .htaccess rule for Magento that will set the store code for running of it to admin and create redirect to /admin/ request path if it is not defined. You need to define rules like these to make it possible:

SetEnvIf Host ^admin\.yourdomain\.com$ MAGE_RUN_CODE=admin
RewriteEngine On
RewriteCond %{HTTP:HOST} ^admin\.yourdomain\.com$
RewriteCond %{REQUEST_URI} !/admin/
RewriteRule .* %{REQUEST_URI}index.php/admin/ [R=302,L]

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.