PHP 5.6.40
Preview: .htaccess Size: 5.34 KB
//var/softaculous/presta17/.htaccess

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# https://www.prestashop-project.org

# Prevent directory listings
Options -Indexes

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
# Sets the HTTP_AUTHORIZATION header removed by apache
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]



#Domain: [[domhost]]
RewriteRule . - [E=REWRITEBASE:[[relativeurl]]/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]

# Rewrites for product images (support up to < 10 million images)
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$1$6 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$1$7 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$1$8 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^(([\d])([\d])([\d])([\d])([\d])([\d])([\d])(?:\-[\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$5/$6/$7/$8/$1$9 [L]
# Rewrites for category images
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^c/([\d]+)(|_thumb)(\-[\.*\w-]*)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3$4 [L]
RewriteCond %{HTTP_HOST} ^[[domhost]]$
RewriteRule ^c/([a-zA-Z_-]+)(|_thumb)(-[\d]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3$4 [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ %{ENV:REWRITEBASE}js/jquery/plugins/fancybox/images/$1.$2 [L]

# Send all other traffic to dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

# Serve fonts properly and avoid CORS issues
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff
AddType font/woff2 .woff2
<IfModule mod_headers.c>
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

# Protect sensitive files from being accessed directly
<FilesMatch "^(composer\.lock|\.git.*|\.env.*)$">
    # Apache 2.2
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
    </IfModule>

    # Apache 2.4
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
</FilesMatch>

# Cache control for static files
<IfModule mod_expires.c>
    ExpiresActive On
    AddType image/webp .webp
    ExpiresByType image/webp "access plus 1 month"
    ExpiresByType image/avif "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"
    ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
    ExpiresByType application/font-woff "access plus 1 year"
    ExpiresByType application/x-font-woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
    ExpiresByType font/opentype "access plus 1 year"
    ExpiresByType font/ttf "access plus 1 year"
    ExpiresByType font/otf "access plus 1 year"
    ExpiresByType application/x-font-ttf "access plus 1 year"
    ExpiresByType application/x-font-otf "access plus 1 year"
</IfModule>

# Remove Etag header as this can cause issues with caching
<IfModule mod_headers.c>
    Header unset Etag
</IfModule>
FileETag none

# Enable GZIP compression for text, HTML, JavaScript, CSS, fonts and SVG files
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype image/svg+xml
    </IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 [[relativeurl]]/index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

Directory Contents

Dirs: 7 × Files: 30

Name Size Perms Modified Actions
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
images DIR
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
php53 DIR
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
php56 DIR
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
php71 DIR
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
php81 DIR
- drwxr-xr-x 2026-06-06 10:09:14
Edit Download
php82 DIR
- drwxr-xr-x 2026-06-06 10:09:13
Edit Download
5.34 KB lrw-r--r-- 2025-11-04 00:35:20
Edit Download
5.01 KB lrw-r--r-- 2026-04-03 09:12:46
Edit Download
6.16 KB lrw-r--r-- 2026-06-05 05:35:32
Edit Download
28.36 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
5.14 KB lrw-r--r-- 2026-04-03 09:12:46
Edit Download
4.95 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
447 B lrw-r--r-- 2024-01-03 04:51:40
Edit Download
8.48 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
403 B lrw-r--r-- 2026-04-03 09:12:46
Edit Download
6.60 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
4.67 KB lrw-r--r-- 2026-06-05 05:35:32
Edit Download
1.12 KB lrw-r--r-- 2021-12-23 06:54:36
Edit Download
20.89 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
1.51 KB lrw-r--r-- 2024-04-16 09:24:16
Edit Download
1.99 KB lrw-r--r-- 2026-06-05 08:14:22
Edit Download
56.92 KB lrw-r--r-- 2025-06-19 02:46:34
Edit Download
2.95 KB lrw-r--r-- 2026-04-03 09:12:46
Edit Download
56.13 KB lrw-r--r-- 2025-06-19 02:46:34
Edit Download
830 B lrw-r--r-- 2026-04-03 09:12:46
Edit Download
11 B lrw-r--r-- 2021-12-23 06:54:36
Edit Download
706.47 KB lrw-r--r-- 2026-06-05 05:35:32
Edit Download
136.68 MB lrw-r--r-- 2026-06-05 05:35:32
Edit Download
43.86 KB lrw-r--r-- 2025-06-19 02:46:34
Edit Download
4.73 KB lrw-r--r-- 2025-06-19 02:46:34
Edit Download
23 B lrw-r--r-- 2021-12-23 06:54:36
Edit Download
3.16 KB lrw-r--r-- 2026-05-20 06:36:52
Edit Download
3.08 KB lrw-r--r-- 2021-12-23 06:54:36
Edit Download
544 B lrw-r--r-- 2023-07-17 09:33:24
Edit Download
497 B lrw-r--r-- 2023-03-21 05:54:32
Edit Download
5.09 KB lrw-r--r-- 2026-04-03 09:12:46
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).