Jump to content

Problème redirection


Recommended Posts

Bonjour à tous,

 

J rencontre actuellement unimmer sur mon site.

 

Ce matin j'ai été remarqué dans mon back office prestashop un message d'erreur dans l'information qui me disait que il me manquer des fichiers dans le cache smarty.

 

Voulant régler seimin seul en n'étant pas expert et j'ai suivi un tuto disant d'insérer se fichier à la racine de mon site:

 

Safe-index.php

 

<? Php
/ *
 * Safe-index.php Génère récursément "safe" index.php lorsqu'il n'existe aucun 
 * 
 * Copyright © 2008 doekia Enter-Solutions GPL
 * 
 * Il suffit d'exécuter ceci à partir du document "docroot" afin que l'index généré mette en œuvre un 
 * Redirection appropriée http (docroot)
 *  
 * /
 
Indice de fonction (chemin $)
{
Static $ gmdate = null;
$ Gmdate === null && $ gmdate = gmdate ('D, d MYH: i: s');
 
Vide ($ chemin) && $ path = '.';
If (file_exists ($ path. '/ Index.php')) retour;
 
Echo $ path.PHP_EOL;
 
$ Sub = preg_replace ('# [^ /] + #', '..', $ path);
$ Path == '.' && $ sub = '.';
 
$ Content = <<< EOF
<? Php
 
En-tête ("Expire: lun. 26 juil 1997 05:00:00 GMT");
En-tête ("Last-Modified: $ gmdate GMT");
 
En-tête ("Cache-Control: no-store, no-cache, must-revalidate");
En-tête ("Cache-Control: post-check = 0, pré-check = 0", false);
En-tête ("Pragma: no-cache");
 
En-tête ("Emplacement: $ sub /");
 
Sortie;
EOF;
 
File_put_contents ($ path. '/ Index.php', $ content);
}
 
$ Scan = new RecursiveIteratorIterator (new RecursiveDirectoryIterator ('.', RecursiveIteratorIterator :: SELF_FIRST));
Foreach ($ scan sous $ file) {
Si ($ fichier-> isDir ()) {
$ Item = $ file-> getPathname ();
Si (basename ($ item) === '.') {
Index (substr ($ item, 2, -2));
}
}
}
 
Cela a été confirmé. Le message d'erreur a été bien défini dans le back office.
 
Cependant, effacant les cookies et cache de mon navigateur je n'ai plus accès à mon site www.phoneticstore.com.
 
Je suis retourné dans mon ftp afin de supprimer le fichier ci-dessous et toujours rien.
 
Message d'erreur:
 
Cette page ne fonctionne pas

Www.phoneticstore.com  vous êtes redirigé à trop nombreuses reprises.

ERR_TOO_MANY_REDIRECTS

 

 

J'ai accés aux identifiant de mon back office et une fois valider plus d'accès.

J'ai le même sujet sur tous les navigateurs.

 

Voici l'accès mon fichier:

 

RewriteOptions hériter
Php_value max_input_vars 3000
 
# ~~ start ~~ Ne supprimez pas ce commentaire, Prestashop conservera automatiquement le code en dehors de ce commentaire lorsque .htaccess sera généré à nouveau
# .htaccess généré automatiquement par PrestaShop e-commerce open-source solution
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE Activé
</ IfModule>
 
RewriteEngine on
 
 
#Domaine: www.phoneticstore.com
RewriteRule. - [E = REWRITEBASE: /]
RewriteRule ^ api $ api / [L]
 
RewriteRule ^ api /(.*)$% {ENV: REWRITEBASE} webservice / dispatcher.php? Url = $ 1 [QSA, L]
 
# Images
RewriteRule ^ ([0-9]) (\ - [_ a-zA-Z0-9 -] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / P / $ 1 / $ 1 $ 2 $ 3.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) (\ - [_ a-zA-Z0-9 -] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 1 $ 2 $ 3 $ 4.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) (\ - [_ a-zA-Z0-9 -] *)? (- [0-9] +)? / . + \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 3 / $ 1 $ 2 $ 3 $ 4 $ 5.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) ([0-9]) (\ - [_ a-zA-Z0-9 -] *)? (- [0 -9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 3 / $ 4 / $ 1 $ 2 $ 3 $ 4 $ 5 $ 6.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) (\ - [_ a-zA-Z0-9-] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 3 / $ 4 / $ 5 / $ 1 $ 2 $ 3 $ 4 $ 5 $ 6 $ 7.jpg [ L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) (\ - [_ a- ZA-Z0-9 -] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 3 / $ 4 / $ 5 / $ 6 / $ 1 $ 2 $ 3 $ 4 $ 5 $ 6 $ 7 $ 8.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9] ) (\ - [_ a-zA-Z0-9 -] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p / $ 1 / $ 2 / $ 3 / 4 $ / 5 $ / 6 $ / 7 $ / 1 $ 2 $ 3 $ 3 $ 4 $ 5 $ 6 $ 7 $ 8 $ 9.jpg [L]
RewriteRule ^ ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9]) ([0-9] ) ([0-9]) (\ - [_ a-zA-Z0-9 -] *)? (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / p /$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^ c / ([0-9] +) (\ - [\. * _ A-zA-Z0-9 -] *) (- [0-9] +)? /.+ \. Jpg $% {ENV : REWRITEBASE} img / c / $ 1 $ 2 $ 3.jpg [L]
RewriteRule ^ c / ([a-zA-Z _-] +) (- [0-9] +)? /.+ \. Jpg $% {ENV: REWRITEBASE} img / c / $ 1 $ 2.jpg [L]
# AlphaImageLoader pour IE et fancybox
RewriteRule ^ images_ie /? ([^ /] +) \. (Jpe? G | png | gif) $ js / jquery / plugins / fancybox / images / $ 1. $ 2 [L]
 
# 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>
 
AddType application / vnd.ms-fontobject .eot
Police AddType / ttf .ttf
AddType font / otf .otf
AddType application / x-font-woff .woff
<IfModule mod_headers.c>
<FilesMatch "\. (Ttf | ttc | otf | eot | woff | svg) $">
Ensemble d'en-têtes Access-Control-Allow-Origin "*"
</ FilesMatch>
</ IfModule>
 
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image / gif "accès plus 1 mois"
ExpiresByType image / jpeg "accès plus 1 mois"
ExpiresByType image / png "accès plus 1 mois"
ExpiresByType text / css "accès plus 1 semaine"
ExpiresByType texte / javascript "accès plus 1 semaine"
ExpiresByType application / javascript "accès plus 1 semaine"
ExpiresByType application / x-javascript "accès plus 1 semaine"
ExpiresByType image / x-icon "accès plus 1 an"
ExpiresByType image / svg + xml "accès plus 1 an"
ExpiresByType image / vnd.microsoft.icon "accès plus 1 an"
ExpiresByType application / font-woff "accès plus 1 an"
ExpiresByType application / x-font-woff "accès plus 1 an"
ExpiresByType application / vnd.ms-fontobject "accès plus 1 an"
ExpiresByType police / opentype "accès plus 1 an"
ExpiresByType font / ttf "accès plus 1 an"
ExpiresByType font / otf "accès plus 1 an"
ExpiresByType application / x-font-ttf "accès plus 1 an"
ExpiresByType application / x-font-otf "accès plus 1 an"
</ IfModule>
 
<IfModule mod_headers.c>
En-tête désactivé Etag
</ IfModule>
FileETag aucun
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text / html text / css texte / javascript application / javascript application / x-javascript font / ttf application / x-font-ttf font / otf application / x-font-otf police / opentype image / svg + xml
</ IfModule>
</ IfModule>
 
# Si le programme de réécriture n'est pas activé
ErrorDocument 404 /index.php?controller=404
 
# ~~ end ~~ Ne supprimez pas ce commentaire, Prestashop conservera automatiquement le code en dehors de ce commentaire lorsque .htaccess sera généré à nouveau
 
# Php - BEGIN cPanel-generator handler, ne pas modifier
# Ce domaine hérite du package "PHP".
# Php - END cPanel-generated handler, ne pas modifier
 
Apparement j'ai deux redirection en 301 et une en 302.
 
J'espère avoir été clair car je suis novice.
 
Merci d'avance pour votre réponse.
 
Cordialement
Link to comment
Share on other sites

Merci pour ta réponse et je m'excuse d'avoir mal formuler ma demande.

 

Pour faire simple je n'ai plus accés à mon site ni à mon back office.

 

Voici le message d'erreur :

 

J'ai contacter mon hébergeur et il me dit que j'ai 3 Redirection. 2 en 301 et une en 302.

 

Je ne sais pas si ce qu'il faut faire par FTP étant donné que je n'ai pas accés au BO

 

https://www.phoneticstore.com/

Link to comment
Share on other sites

Bon après inspection de ton shop, les 3 "modules" suivant sont les coupables (les 3)

PWSEONoIndex

PWSEOCannonical

ICodePSLibrary

 

je les ai renommés (donc plus visible du prestashop)

 

Je soupçonne ces derniers de faire des trucs chelou genre du load dynamique par glob sans filtre et par là même de charger et donc exécuter les fichiers index.php de sécurité.

2 solutions maintenant:

- soit faire corriger ces modules par leurs développeurs (recommandé)

- soit virer les fichiers index.php de sécurité

Je te laisse voir par toi même.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...