Salut !
Je cherche des explications concernant l'ordre des règles du fichier htaccess.
Ce dernier se trouve à la racine du site mais je dois en ajouter d'autres pour référencer mon forum (phpBB SEO mod Rewrite Intermédiaire)
Je ne sais donc pas si je dois les placer à la suite, ou entre d'autres déjà existantes.
Pour l'instant, il est constitué de cette façon :
En premier lieu :
Les règles "RedirectPermanent" (pour les pages dont l'url a changé)
Au nombre de 9.
Ensuite :
La règle permettant de forcer le "www"
RewriteEngine on
RewriteCond %{HTTP_HOST} ^otop-nutrition.fr [NC]
RewriteRule ^(.*) http://www.otop-nutrition.fr/$1 [QSA,R=301,L]
Ensuite cette liste pris sur wri :
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^-?$ [OR]
RewriteCond %{HTTP_USER_AGENT} Advanced\ Email\ Extractor [OR]
RewriteCond %{HTTP_USER_AGENT} almaden [NC,OR]
RewriteCond %{HTTP_USER_AGENT} @nonymouse [OR]
RewriteCond %{HTTP_USER_AGENT} Art-Online [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} Crescent\ Internet\ ToolPack [OR]
RewriteCond %{HTTP_USER_AGENT} DirectUpdate [OR]
RewriteCond %{HTTP_USER_AGENT} Download\ Accelerator [OR]
RewriteCond %{HTTP_USER_AGENT} eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} echo\ extense [OR]
RewriteCond %{HTTP_USER_AGENT} EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} Fetch\ API\ Request [OR]
RewriteCond %{HTTP_USER_AGENT} flashget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} frontpage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} HTTP\ agent [OR]
RewriteCond %{HTTP_USER_AGENT} HTTPConnect [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [OR]
RewriteCond %{HTTP_USER_AGENT} IPiumBot\ laurion(dot)com [OR]
RewriteCond %{HTTP_USER_AGENT} Kapere [OR]
RewriteCond %{HTTP_USER_AGENT} libwww-perl [OR]
RewriteCond %{HTTP_USER_AGENT} Microsoft\ URL\ Control [OR]
RewriteCond %{HTTP_USER_AGENT} minibot\(NaverRobot\) [OR]
RewriteCond %{HTTP_USER_AGENT} NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} Program\ Shareware [OR]
RewriteCond %{HTTP_USER_AGENT} QuepasaCreep [OR]
RewriteCond %{HTTP_USER_AGENT} SiteMapper [OR]
RewriteCond %{HTTP_USER_AGENT} Star\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} SurveyBot [OR]
RewriteCond %{HTTP_USER_AGENT} Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} Telesoft [OR]
RewriteCond %{HTTP_USER_AGENT} TuringOS [OR]
RewriteCond %{HTTP_USER_AGENT} TurnitinBot [OR]
RewriteCond %{HTTP_USER_AGENT} vobsub [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webbandit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} WebCapture [OR]
RewriteCond %{HTTP_USER_AGENT} webcollage [OR]
RewriteCond %{HTTP_USER_AGENT} WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} WebDAV [OR]
RewriteCond %{HTTP_USER_AGENT} WebEmailExtractor [OR]
RewriteCond %{HTTP_USER_AGENT} WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} WEBsaver [OR]
RewriteCond %{HTTP_USER_AGENT} WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} Wget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Wysigot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} Zeus [OR]
RewriteCond %{HTTP_REFERER} ^XXX
RewriteRule ^.*$ http://www.autre_site.com [R,L]
# Une redirection interne compte pour 2 hits
# Une redirection externe compte pour 1 hit
Votre avis ? Merci !
Je cherche des explications concernant l'ordre des règles du fichier htaccess.
Ce dernier se trouve à la racine du site mais je dois en ajouter d'autres pour référencer mon forum (phpBB SEO mod Rewrite Intermédiaire)
Je ne sais donc pas si je dois les placer à la suite, ou entre d'autres déjà existantes.
Pour l'instant, il est constitué de cette façon :
En premier lieu :
Les règles "RedirectPermanent" (pour les pages dont l'url a changé)
Au nombre de 9.
Ensuite :
La règle permettant de forcer le "www"
RewriteEngine on
RewriteCond %{HTTP_HOST} ^otop-nutrition.fr [NC]
RewriteRule ^(.*) http://www.otop-nutrition.fr/$1 [QSA,R=301,L]
Ensuite cette liste pris sur wri :
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^-?$ [OR]
RewriteCond %{HTTP_USER_AGENT} Advanced\ Email\ Extractor [OR]
RewriteCond %{HTTP_USER_AGENT} almaden [NC,OR]
RewriteCond %{HTTP_USER_AGENT} @nonymouse [OR]
RewriteCond %{HTTP_USER_AGENT} Art-Online [OR]
RewriteCond %{HTTP_USER_AGENT} CherryPicker [OR]
RewriteCond %{HTTP_USER_AGENT} Crescent\ Internet\ ToolPack [OR]
RewriteCond %{HTTP_USER_AGENT} DirectUpdate [OR]
RewriteCond %{HTTP_USER_AGENT} Download\ Accelerator [OR]
RewriteCond %{HTTP_USER_AGENT} eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} echo\ extense [OR]
RewriteCond %{HTTP_USER_AGENT} EmailCollector [OR]
RewriteCond %{HTTP_USER_AGENT} EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} Fetch\ API\ Request [OR]
RewriteCond %{HTTP_USER_AGENT} flashget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} frontpage [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} HTTP\ agent [OR]
RewriteCond %{HTTP_USER_AGENT} HTTPConnect [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [OR]
RewriteCond %{HTTP_USER_AGENT} IPiumBot\ laurion(dot)com [OR]
RewriteCond %{HTTP_USER_AGENT} Kapere [OR]
RewriteCond %{HTTP_USER_AGENT} libwww-perl [OR]
RewriteCond %{HTTP_USER_AGENT} Microsoft\ URL\ Control [OR]
RewriteCond %{HTTP_USER_AGENT} minibot\(NaverRobot\) [OR]
RewriteCond %{HTTP_USER_AGENT} NICErsPRO [OR]
RewriteCond %{HTTP_USER_AGENT} NPBot [OR]
RewriteCond %{HTTP_USER_AGENT} Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} Program\ Shareware [OR]
RewriteCond %{HTTP_USER_AGENT} QuepasaCreep [OR]
RewriteCond %{HTTP_USER_AGENT} SiteMapper [OR]
RewriteCond %{HTTP_USER_AGENT} Star\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} SurveyBot [OR]
RewriteCond %{HTTP_USER_AGENT} Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} Telesoft [OR]
RewriteCond %{HTTP_USER_AGENT} TuringOS [OR]
RewriteCond %{HTTP_USER_AGENT} TurnitinBot [OR]
RewriteCond %{HTTP_USER_AGENT} vobsub [NC,OR]
RewriteCond %{HTTP_USER_AGENT} webbandit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} WebCapture [OR]
RewriteCond %{HTTP_USER_AGENT} webcollage [OR]
RewriteCond %{HTTP_USER_AGENT} WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} WebDAV [OR]
RewriteCond %{HTTP_USER_AGENT} WebEmailExtractor [OR]
RewriteCond %{HTTP_USER_AGENT} WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} WEBsaver [OR]
RewriteCond %{HTTP_USER_AGENT} WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} Wget [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Wysigot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} Zeus [OR]
RewriteCond %{HTTP_REFERER} ^XXX
RewriteRule ^.*$ http://www.autre_site.com [R,L]
# Une redirection interne compte pour 2 hits
# Une redirection externe compte pour 1 hit
Votre avis ? Merci !