Bonjour,
Mon pote, tourne sur Shopfactory.
Il souhaite forcer le passage en https.
J'ai donc modifié son fichier .htaccess comme suit :
Le truc, le site tourne il a des commandes, mais ça le bloque lors de la mise à jour de son site via l'interface. Soit c'est le serveur de chez OVH, qui rame soit c'est mon rajout de code en bas.
Merci de vos retours.
Bonne journée.
Modifié par Tintin75 (29 May 2020 - 10:38)
Mon pote, tourne sur Shopfactory.
Il souhaite forcer le passage en https.
J'ai donc modifié son fichier .htaccess comme suit :
# Unfortunately starting with Apache 2 by default the line AddDefaultCharset ISO-8859-1
# is added which won't work with ShopFactory shops which are now completely in UTF-8.
#
# This line should help alleviate the problems in those circumstances. Note that if you
# have your own .htaccess file, this line should be added if you don't have access to the
# Apache configuration file and can either remove that line or change it.
AddDefaultCharset Off
AddType text/html .html .htm
RemoveHandler .html
# Enable browser caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 hour"
ExpiresByType text/x-javascript "access 1 hour"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
# Add correct content-type for fonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg
ExpiresByType application/vnd.ms-fontobject "access 1 year"
ExpiresByType application/x-font-ttf "access 1 year"
ExpiresByType application/x-font-opentype "access 1 year"
ExpiresByType application/x-font-woff "access 1 year"
ExpiresByType image/svg+xml "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
# Enable compression
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
#<IfModule mod_deflate.c>
#AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/javascript
#</IfModule>
# Begin SF-2407 SEO
<FilesMatch "^.*\.(php|inc|ini)">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, nofollow"
</FilesMatch>
<FilesMatch "^(autolangdetect|core|date|lang_.*|loader|net|sf|stat|cntyList|.*_(_\d\d)?|.*map_\d+|acx.*|echo.*|ellipsis.*|flickity.*|jquery.*|menu.*|nav.*)\.js">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, nofollow"
</FilesMatch>
<FilesMatch "^(cload|core|dynamic|extra|grey|lang|loadjs|pconfirm|progress|provider|reseller|stat|ups|utils)\.html">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, nofollow"
</FilesMatch>
<FilesMatch "^(terms_email|terms_for_returning_products_email|ver|stopwords.*)\.txt">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, nofollow"
</FilesMatch>
<FilesMatch "^(basket|changecurrency|clearterms|conf|confirm_email|customerdtl|favorites|front*|load_.*|login|optinout|orderterms|ordertotal|otherurl|progress|shipping_charge|terms_email|terms_for_returning_products_email|thankyou|unsuccessful|V6No|V6Yes|website)\.html">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, nofollow"
</FilesMatch>
# menu structure:no-index BUT DO follow
<FilesMatch "^(d-33|d-34)\.html">
Header set X-Robots-Tag "noindex, noarchive, nosnippet, follow"
</FilesMatch>
<FilesMatch "^search.*\.(php|inc|html|js)">
Header set X-Robots-Tag "noindex, nosnippet, nofollow"
</FilesMatch>
# End SF-2407 SEO
#Rajout pour forcer le passage en https
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
Le truc, le site tourne il a des commandes, mais ça le bloque lors de la mise à jour de son site via l'interface. Soit c'est le serveur de chez OVH, qui rame soit c'est mon rajout de code en bas.
Merci de vos retours.
Bonne journée.
Modifié par Tintin75 (29 May 2020 - 10:38)