You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Magento 1.9开启SSL后无index.php页面无法加载问题求助

Troubleshooting SSL-enabled Pages Without index.php Not Loading

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 RewriteBase matches 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-Proto header 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., in httpd.conf or 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 07:02:29