SSL Error in Magento (404 Not Found)

2019-08-21 07:39发布

问题:

Some background info: I am running the latest version of magento. My install is hosted on SiteGround and I have an addon domain linked to the magento folder as its root. I have webserver rewrites enabled, autoredirect to base url disabled. My unsecure domain is in the format http://www.domain.com/, my secure https://www.domain.com. I have secure url for frontend enabled and secure url for backend disabled.

My Problem: Everything in the backend works wonderfully. However, in the frontend, the main page loads, but upon trying to login i get a 404 not found (as it is using the https:// secure domain). If i add alter the address to include index.php/ the page loads and the error goes away. I am pretty sure its a .htaccess issue, however I am not sure how to resolve it. Any help would be greatly appreciated.

Thank you. soliman

回答1:

Soliman, Have you checked if the options under System > Configuration > Web > Url Options | Search Engines | (Un)Secure are conform to what you want?



回答2:

I am using Apache 2.4 and Magento 1.9.X and had the same issue.
The fix for me was creating a .htacess file at the root website folder, where magento folders are (app, skin, media. etc) with the code below:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://my-site.com/$1 [R=301,L]
RewriteRule ^index.php/(admin|user)($|/) - [L]
RewriteRule ^index.php/(.*) $1 [R=301,QSA,L]
</IfModule>

found it here:
How to remove index.php from URLs?