# ~~start~~ Do not remove this comment, PhenixSuite will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PhenixSuite e-commerce open-source solution # https://www.phenixsuite.com Options -Indexes SetEnv HTTP_MOD_REWRITE On RewriteEngine on # Protection RewriteCond %{REMOTE_ADDR} ^([0-9]{1,3})\. RewriteCond %{DOCUMENT_ROOT}/cache/block/%1/%{REMOTE_ADDR}.txt -f RewriteRule !error/.*\.html - [F,L] RewriteCond %{DOCUMENT_ROOT}/cache/block/%{REMOTE_ADDR}.txt -f RewriteRule !error/.*\.html - [F,L] RewriteCond %{REQUEST_URI} \.shtml? [NC,OR] RewriteCond %{QUERY_STRING} \.shtml? [NC] RewriteRule . - [R=410,L] RewriteCond %{HTTP_USER_AGENT} (AhrefsBot(.*)|AI2Bot(.*)|Anonymous(.*)|anthropic-ai(.*)|Bytespider(.*)|checkprivacy(.*)|ChinaClaw(.*)|Claude-Web(.*)|ClaudeBot(.*)|DataForSeoBot(.*)|Email|EmailCollector(.*)|EmailSiphon(.*)|EmailWolf(.*)|g00g1e(.*)|GPTBot(.*)|PetalBot(.*)|openai(.*)|crawler|SearchBot) [NC] RewriteRule !error/.*\.html - [F,L] RewriteRule ^(.*)/{shop_logo} /img/logo.jpg [L] #Domain: discountmymobile.fr RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api$ api/ [L] RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteCond $0 !=img/favicon.ico RewriteRule ^(|.*/)favicon\.(ico|gif|png|jpe?g)$ %{ENV:REWRITEBASE}img/favicon-1.ico [L] RewriteCond $0 !=img/apple-touch-icon-1.png RewriteRule ^(|.*/)apple-touch-icon.png$ %{ENV:REWRITEBASE}img/apple-touch-icon-1.png [L] # Images RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^(([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^(([\d])([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^(([\d])([\d])([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ 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} ^discountmymobile.fr$ 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} ^discountmymobile.fr$ 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} ^discountmymobile.fr$ 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] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif|webp)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^discountmymobile.fr$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] #Domain: discountmymobile.com RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api$ api/ [L] RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteCond $0 !=img/favicon.ico RewriteRule ^(|.*/)favicon\.(ico|gif|png|jpe?g)$ %{ENV:REWRITEBASE}img/favicon.ico [L] RewriteCond $0 !=img/apple-touch-icon-9.png RewriteRule ^(|.*/)apple-touch-icon.png$ %{ENV:REWRITEBASE}img/apple-touch-icon-9.png [L] # Images RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^(([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$1$3 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^(([\d])([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$1$4 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^(([\d])([\d])([\d])(?:\-[_\w-]*)?)/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/p/$2/$3/$4/$1$5 [L] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ 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} ^discountmymobile.com$ 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} ^discountmymobile.com$ 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} ^discountmymobile.com$ 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] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+(\.(?:jpe?g|webp|png|avif))$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif|webp)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^discountmymobile.com$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] Header unset Etag Header set X-XSS-Protection "1; mode=block" Header set X-Content-Type-Options "nosniff" Order allow,deny Deny from all Require all denied Header set Access-Control-Allow-Origin "*" Header set Content-Disposition "Attachment" FileETag none AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType font/woff2 .woff2 AddType application/x-font-woff .woff AddType image/webp .webp 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 application/x-font-woff application/x-font-woff2 ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/webp "access plus 1 month" ExpiresByType video/ogg "access plus 1 month" ExpiresByType audio/ogg "access plus 1 month" ExpiresByType audio/mp3 "access plus 1 month" ExpiresByType video/mp4 "access plus 1 month" ExpiresByType video/webm "access plus 1 month" ExpiresByType image/avif "access plus 1 month" ExpiresByType image/avif-sequence "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" 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 application/x-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 font/woff2 "access plus 1 year" ExpiresByType application/x-font-ttf "access plus 1 year" ExpiresByType application/x-font-otf "access plus 1 year" # Non-existent images to 404 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(?:jpe?g|webp|png|avif)$ - [R=404,L] #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, PhenixSuite will keep automatically the code outside this comment when .htaccess will be generated again # Google PageSpeed Module ModPagespeed Off # END Google PageSpeed Module # ~pagespeed_bottom_end~ Header unset Etag FileETag None Header unset ETag Header set Cache-Control "max-age=2592000, public" Header set Cache-Control "max-age=604800, public" Header set Cache-Control "max-age=216000, public" # Pour appliquer noindex à tout le site