👁 查看:.htaccess
路径:/home/boguraj1/public_html/epaper/public/.htaccess
大小:2.25 KB · 修改:2026-09-06 09:53:42 · 权限:0644 · 可写
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    # Allow Apache to follow the "storage" symlink so uploaded images load.
    # If your host rejects "FollowSymLinks" in .htaccess, use instead:
    #   Options +SymLinksIfOwnerMatch
    Options +FollowSymLinks

    RewriteEngine On

    # ── IMPORTANT ────────────────────────────────────────────────────────────
    #  Local XAMPP serves this app under an alias  ->  http://localhost/epaper
    #  so RewriteBase must be /epaper/ here.
    #
    #  ON cPANEL / LIVE HOSTING:
    #    - domain root ( https://example.com )      -> set:  RewriteBase /
    #    - sub-folder  ( https://example.com/epaper) -> keep: RewriteBase /epaper/
    # ─────────────────────────────────────────────────────────────────────────
RewriteBase /
    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # ── Force HTTPS (enable ONLY after an SSL certificate is active on the
    #    domain, otherwise the site becomes unreachable):
    # RewriteCond %{HTTPS} !=on
    # RewriteCond %{HTTP:X-Forwarded-Proto} !https
    # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# Larger uploads for newspaper page images (takes effect only when PHP runs
# as an Apache module; on cPanel PHP-FPM/CGI use the bundled public/.user.ini).
<IfModule mod_php7.c>
    php_value upload_max_filesize 32M
    php_value post_max_size 40M
    php_value max_execution_time 300
</IfModule>
<IfModule mod_php.c>
    php_value upload_max_filesize 32M
    php_value post_max_size 40M
    php_value max_execution_time 300
</IfModule>