Magento 1.9开启SSL后无index.php页面无法加载问题求助
Let’s walk through targeted fixes since you’ve already checked the core settings (rewrites enabled, secure URLs set, cache cleared, fresh .htaccess):
Verify your .htaccess rules are HTTPS-compatible
For Magento (your admin settings align with its configuration options), make sure your .htaccess includes rules that account for HTTPS. Here’s a standard working snippet:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Redirect HTTP to HTTPS if needed RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Rewrite non-file/directory requests to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>Double-check that
RewriteBasematches your Magento installation directory (e.g.,/store/if it’s hosted in a subfolder).Ensure your web server allows .htaccess overrides
Even if mod_rewrite is enabled globally, your Apache virtual host might block .htaccess rules. Open your virtual host config file and confirm you have:<Directory /path/to/your/magento/root> AllowOverride All Require all granted </Directory>Restart Apache after making changes to apply the setting.
Validate the SSL_OFFLOADED header is actually being passed
Your offloader header setting depends on the server/proxy sending this header to Magento. Test it by creating a quick PHP file (e.g.,test-header.php) with:<?php echo $_SERVER['SSL_OFFLOADED'] ?? 'Header not detected'; ?>Access it via HTTPS—if it returns "Header not detected", you’ll need to configure your load balancer/proxy to send this header (or switch to the more common
X-Forwarded-Protoheader and update Magento’s offloader setting to match).Confirm database URL settings are fully synced
Sometimes admin panel settings don’t propagate correctly to the database. Run this SQL query to check:SELECT path, value FROM core_config_data WHERE path IN ('web/unsecure/base_url', 'web/secure/base_url', 'web/secure/base_link_url');Ensure all values start with
https://and match your domain exactly. If any are incorrect, update them directly in the database (then clear Magento’s cache again).Check for conflicting server-level rewrites
Global rewrite rules (e.g., inhttpd.confor a server-wide .htaccess) might override your Magento-specific rules. Temporarily disable non-essential global rewrites to test if this resolves the issue.
内容的提问来源于stack exchange,提问作者jamie12

