[Résolu] Probleme redirection 404 - 301

Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: 1.11.7
#~ Url du site : www.canopee.be
#~ Hébergeur / Soft : OVH
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.11.7
#~ Installed Modules:
#~ CMSMailer: 5.2.1
#~ CMSPrinting: 1.0.4
#~ FileManager: 1.4.3
#~ MenuManager: 1.8.5
#~ MicroTiny: 1.2.5
#~ ModuleManager: 1.5.5
#~ News: 2.12.12
#~ Search: 1.7.8
#~ ThemeManager: 1.1.8
#~ Gallery: 1.6.1
#~ AjaxMadeSimple: 0.4.0
#~ FormBuilder: 0.7.3
#~ TinyMCE: 2.9.12
#~ PHPMyAdmin: 3.4.0b3
#~ CGExtensions: 1.37
#~ ListIt2ad: 1.4
#~ ListIt2listeadherent: 1.4
#~ ListIt2: 1.4
#~ FormBrowser: 0.4.2
#~ SiteMapMadeSimple: 1.2.7
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template:
#~ max_upload_size: 64000000
#~ url_rewriting: mod_rewrite
#~ page_extension:
#~ query_var: page
#~ image_manipulation_prog: GD
#~ auto_alias_content: true
#~ locale:
#~ default_encoding: utf-8
#~ admin_encoding: utf-8
#~ set_names: true
#~ Php Information:
#~ phpversion: 5.3.16
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ E_STRICT: 0
#~ E_DEPRECATED: 8192
#~ memory_limit: 128M
#~ max_execution_time: 120
#~ output_buffering: 4096
#~ safe_mode: Off (Faux)
#~ file_uploads: On (Vrai)
#~ post_max_size: 64M
#~ upload_max_filesize: 64M
#~ session_save_path: /tmp (1777)
#~ session_use_cookies: On (Vrai)
#~ xml_function: On (Vrai)
#~ xmlreader_class: On (Vrai)
#~ Server Information:
#~ Server Api: cgi-fcgi
#~ Server Db Type: MySQL (mysqli)
#~ Server Db Version: 5.1.49
#~ Server Db Grants: Impossible de trouver un privilège "GRANT ALL". Cela peut signifier que vous pourriez avoir des problèmes pour installer ou retirer des modules, ou encore l 'ajout et la suppression d'éléments, y compris les pages.
#~ ----------------------------------------------
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour,

C'est nounouille à nouveau...

J'essaye désespérément de rediriger mes pages de mon ancien site (html) vers l'index de mon site (en super cmsms) et je n'y arrive pas.

Mon htaccess est celui ci:
Code :
[== Indéfini ==]
SetEnv PHP_VER 5_3TEST
SetEnv PHP_VER 5_3
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1

#option to remove directory listings in all folder (avoid publishing unwanted contents)
Options -Indexes
Options +FollowSymLinks
# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file.  This may also break other programs you have running under your CMSms
# install that use config.php.  You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
order allow,deny
deny from all
</Files>
# No sense advertising what we are running
ServerSignature Off
RewriteEngine On
###FILTRE CONTRE ROBOTS DES PIRATES ET ASPIRATEURS DE SITE WEB
### LISTE ICI: http://www.bg-pro.com/?goto=badbot
## EXCEPTION: TOUS LES ROBOTS MEMES ANONYMES OU BANNIS PEUVENT ACCEDER A CES FICHIERS
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/sitemap.xml
## EXCEPTION: SI UTILISATION DE *PAYPAL INSTANT NOTIFICATION PAYMENT*, COMME PAYPAL N'UTILISE PAS DE HTTP_USER_AGENT, L'IPN NE MARCHERA PAS.
RewriteCond %{REQUEST_URI} !^/paypal-ipn.php
##
RewriteCond %{HTTP_USER_AGENT} ^-?$ [OR]
## ANONYMES
RewriteCond %{HTTP_USER_AGENT} ^[bcdfghjklmnpqrstvwxz\ ]{8,}|^[0-9a-z]{15,}|^[0-9A-Za-z]{19,}|^[A-Za-z]{3,}\ [a-z]{4,}\ [a-z]{4,} [OR]
## CEUX QUI INVENTENT DES NOMS AU HASARD
RewriteCond %{HTTP_USER_AGENT} ^<sc|<\?|8484\ Boston\ Project|autoemailspider|@nonymouse|ADSARobot|Advanced\ Email\ Extractor|^adwords|ah-ha|aktuelles|amzn_assoc|Anarchie|anonymous|Art-Online|ASPSeek|ASSORT|ATHENS|Atomz|attach|autoemailspider|BackWeb|Bandit|BatchFTP|bdfetch|big.brother|BlackWidow|blogsearchbot-martin|bmclient|Boston\ Project|BravoBrian\ SpiderEngine\ MarcoPolo|Bullseye|bumblebee|capture|CherryPicker|ChinaClaw|CICC|clipping|compatible\ \;|Crescent|Crescent\ Internet|Custo|cyberalert|Deweb|diagem|Digger|Digimarc|DIIbot|DirectUpdate|disco|DISCoFinder|Downloader|Download\ Accelerator|Download\ Demon|Download\ Wonder|Drip|DSurf15a|DTS.Agent|EasyDL|eCatch|echo\ extense|ecollector|efp@gmx\.net|EirGrabber|EmailCollector|EmailSiphon|Email\ Siphon|EmailWolf|Email\ Extractor|Express\ WebPictures|ExtractorPro [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} EyeNetIE|fastlwspider|FavOrg|Favorites\ Sweeper|^Fetch|FEZhead|FileHound|flashget|FlashGet\ WebWasher|FlickBot|fluffy|frontpage|GalaxyBot|Generic|Getleft|GetRight|GetSmart|GetWeb!|GetWebPage|gigabaz|Girafabot|Go!Zilla|go-ahead-got-it|GornKer|Grabber|GrabNet|Grafula|Green\ Research|grub-client|grub\ crawler|hanzoweb|Harvest|hhjhj@yahoo|hloader|HMView|HomePageSearch|HTTPConnect|httpdown|httplib|HttpProxy|HTTP\ agent|http\ generic|HTTrack|ia_archive|IBM_Planetwide|IDBot|id-search|imagefetch|Image\ Stripper|Image\ Sucker|IncyWincy|Indy\ Library|informant|Ingelin|InterGET|InternetLinkAgent|InternetSeer\.com|^Internet\ Explorer|Internet\ Ninja|IPiumBot|Iria|Irvine|Jakarta\ Commons|JBH*Agent [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} JetCar|JOC|JOC\ Web\ Spider|JustView|Kapere|KWebGet|Lachesis|larbin|LeechFTP|LexiBot|lftp|likse|Link*Sleuth|LINKS\ ARoMATIZED|LinkWalker|Mac\ Finder|Mag-Net|Magnet|Mass\ Downloader|MCspider|Microsoft\ URL|Microsoft\ Data|MIDown\ tool|minibot\(NaverRobot\)|Mirror|Missigua|Mister\ PiX|MJ12bot|MMMtoCrawl\/UrlDispatcherLLL|Movable\ Type|Moozilla|^Mozilla$|^MSIE|Murzillo|MSProxy|multithreaddb|nationaldirectory|Navroad|NearSite|NetAnts|NetCarta|NetMechanic|netprospector|NetResearchServer|NetSpider|NetZIP|NetZippy|NetZip\ Downloader|Net\ Vampire|NEWT|nicerspro|NICErsPRO|NPBot|Nutch|Nutscrape/|Octopus|Offline\ Explorer|Offline\ Navigator|OmniExplorer|OpaL|Openfind|OpenTextSiteCrawler [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} TV33_Mercator|UIowaCrawler|URL_Spider_Pro|^user|^User\ Agent:\ |^User-Agent:\ |UtilMind|Vacuum|vagabondo|vayala|visibilitygap|vobsub|VoidEYE|vspider|w3mir|WebaltBot|WebAuto|webbandit|WebCapture|Webclipping|webcollage|webcollector|WebCopier|webcraft@bea|WebDAV|webdevil|webdownloader|Webdup|WebEmailExtractor|WebFetch|WebGo\ IS|WebHook|Webinator|WebLeacher|WEBMASTERS|WebMiner|WebMirror|webmole|WebReaper|WebSauger|WEBsaver|Website\ eXtractor|Website\ Quester|WebSnake|Webster|WebStripper|websucker|webvac|webwalk|webweasel|WebWhacker|WebZIP|Web\ Data\ Extractor|Web\ Downloader|Web\ Image\ Collector|Web\ Sucker|web\.by\.mail|whizbang|WhosTalking|Widow|Widows|WISEbot|WISEnutbot|WUMPUS|Wweb|WWWOFFLE|Wysigot|x-Tractor|Xaldon\ WebSpider|XGET|Yandex|Zeus|Zeus.*Webster [NC]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} ^curl|^Fetch\ API\ Request|GT\:\:WWW|^HTTP\:\:Lite|httplib|^Java/1.|^Java\ 1.|^LWP|libWeb|libwww|^PEAR|PECL\:\:HTTP|PHPCrawl|^Program\ Shareware|python|Rsync|Snoopy|^URI\:\:Fetch|WebDAV|^Wget [NC]
## BIBLIOTHEQUES / CLASSES HTTP DONT ON NE VEUT PAS. ATTENTION, CELA PEUT BLOQUER CERTAINES FONCTIONS DE VOTRE CMS. NE PAS TOUT EFFACER, MAIS CHERCHEZ LE NOM DE LA CLASSE HTTP CONCERNEE (DEMANDEZ AUX DEVELOPPEURS DE VOTRE CMS). CETTE LISTE BLOQUE 80% DES ROBOTS SPAMMEURS. IL FAUT LA CONSERVER.
RewriteRule (.*) - [F]
### DES FAUX URLS, ON LES NEUTRALISE
RedirectMatch gone ^/_vti.*
RedirectMatch gone ^/MSOffice.*
RedirectMatch gone ^[-_a-z0-9/\.]*//.*
RedirectMatch gone ^.*/etc/passwd.*
### FILTRE CONTRE XSS, REDIRECTIONS HTTP, base64_encode, VARIABLE PHP GLOBALS VIA URL, MODIFIER VARIABLE _REQUEST VIA URL, TEST DE FAILLE PHP, INJECTION SQL SIMPLE
RewriteCond %{REQUEST_METHOD} (GET|POST) [NC]
RewriteCond %{QUERY_STRING} ^(.*)(%3C|<)/?script(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)(%3D|=)?javascript(%3A|:)(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)document\.location\.href(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)(%3D|=)http(%3A|:)(/|%2F){2}(.*)$ [NC,OR]
## ATTENTION A CETTE REGLE. ELLE PEUT CASSER CERTAINES REDIRECTIONS RESSEMBLANT A: http://www.truc.fr/index.php?r=http://www.google.fr ##
RewriteCond %{QUERY_STRING} ^(.*)base64_encode(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)GLOBALS(=|[|%[0-9A-Z]{0,2})(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)_REQUEST(=|[|%[0-9A-Z]{0,2})(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)(SELECT|INSERT|DELETE|CHAR\(|UPDATE|REPLACE|LIMIT)(.*)$
<FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
</FilesMatch>
<IfModule mod_deflate.c>
    # Insert filter on all content
    SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</IfModule>
FileETag MTime Size

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]

#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]

#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]

#OR if the URI contains a "<script>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]

#OR if the script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

#OR if any script is trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]

#OR if the URI contains UNION
RewriteCond %{QUERY_STRING} UNION [OR]

#OR if the URI contains a double slash
RewriteCond %{QUERY_STRING} // [OR]

#OR if the URI contains a *
RewriteCond %{QUERY_STRING} \*

#then deny the request (403)
RewriteRule ^.*$ - [F,L]

# End URL Filtering
# redirection vers www
RewriteCond %{HTTP_HOST} ^canopee.be$
RewriteRule ^(.*) http://www.canopee.be/$1 [QSA,L,R=301]
# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
ErrorDocument 404 http://www.canopee.be/404vers301.php
# END CMSMS
# END Rewrite rules

Et la ligne qui est sensé faire tout ça
Code :
[== Indéfini ==]
ErrorDocument 404 http://www.canopee.be/404vers301.php

avec ce code php dedans:
Code :
[== PHP ==]
<?php
header("Status: 301 Moved Permanently", false, 301);
header("Location: http://www.canopee.be/index.php");
exit();
?>

Ne fonctionne pas, j'ai toujour une bête page erreur 404.

Quelqu'un peut-il m'aider sur ce point?

Merci!
Cordialement,
Piet
#1
Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: 1.11.7
#~ Url du site : www.canopee.be
#~ Hébergeur / Soft : OVH
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.11.7
#~ Installed Modules:
#~ CMSMailer: 5.2.1
#~ CMSPrinting: 1.0.4
#~ FileManager: 1.4.3
#~ MenuManager: 1.8.5
#~ MicroTiny: 1.2.5
#~ ModuleManager: 1.5.5
#~ News: 2.12.12
#~ Search: 1.7.8
#~ ThemeManager: 1.1.8
#~ Gallery: 1.6.1
#~ AjaxMadeSimple: 0.4.0
#~ FormBuilder: 0.7.3
#~ TinyMCE: 2.9.12
#~ PHPMyAdmin: 3.4.0b3
#~ CGExtensions: 1.37
#~ ListIt2ad: 1.4
#~ ListIt2listeadherent: 1.4
#~ ListIt2: 1.4
#~ FormBrowser: 0.4.2
#~ SiteMapMadeSimple: 1.2.7
#~ Config Information:
#~ php_memory_limit:
#~ process_whole_template:
#~ max_upload_size: 64000000
#~ url_rewriting: mod_rewrite
#~ page_extension:
#~ query_var: page
#~ image_manipulation_prog: GD
#~ auto_alias_content: true
#~ locale:
#~ default_encoding: utf-8
#~ admin_encoding: utf-8
#~ set_names: true
#~ Php Information:
#~ phpversion: 5.3.16
#~ md5_function: On (Vrai)
#~ gd_version: 2
#~ tempnam_function: On (Vrai)
#~ magic_quotes_runtime: Off (Faux)
#~ E_STRICT: 0
#~ E_DEPRECATED: 8192
#~ memory_limit: 128M
#~ max_execution_time: 120
#~ output_buffering: 4096
#~ safe_mode: Off (Faux)
#~ file_uploads: On (Vrai)
#~ post_max_size: 64M
#~ upload_max_filesize: 64M
#~ session_save_path: /tmp (1777)
#~ session_use_cookies: On (Vrai)
#~ xml_function: On (Vrai)
#~ xmlreader_class: On (Vrai)
#~ Server Information:
#~ Server Api: cgi-fcgi
#~ Server Db Type: MySQL (mysqli)
#~ Server Db Version: 5.1.49
#~ Server Db Grants: Impossible de trouver un privilège "GRANT ALL". Cela peut signifier que vous pourriez avoir des problèmes pour installer ou retirer des modules, ou encore l 'ajout et la suppression d'éléments, y compris les pages.
#~ ----------------------------------------------
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour,

C'est nounouille à nouveau...

J'essaye désespérément de rediriger mes pages de mon ancien site (html) vers l'index de mon site (en super cmsms) et je n'y arrive pas.

Mon htaccess est celui ci:
Code :
[== Indéfini ==]
SetEnv PHP_VER 5_3TEST
SetEnv PHP_VER 5_3
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1

#option to remove directory listings in all folder (avoid publishing unwanted contents)
Options -Indexes
Options +FollowSymLinks
# Deny access to config.php
# This can be useful if php ever breaks or dies
# Use with caution, this may break other functions of CMSms that use a config.php
# file.  This may also break other programs you have running under your CMSms
# install that use config.php.  You may need to add another .htaccess file to those
# directories to specifically allow config.php.
<Files "config.php">
order allow,deny
deny from all
</Files>
# No sense advertising what we are running
ServerSignature Off
RewriteEngine On
###FILTRE CONTRE ROBOTS DES PIRATES ET ASPIRATEURS DE SITE WEB
### LISTE ICI: http://www.bg-pro.com/?goto=badbot
## EXCEPTION: TOUS LES ROBOTS MEMES ANONYMES OU BANNIS PEUVENT ACCEDER A CES FICHIERS
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/sitemap.xml
## EXCEPTION: SI UTILISATION DE *PAYPAL INSTANT NOTIFICATION PAYMENT*, COMME PAYPAL N'UTILISE PAS DE HTTP_USER_AGENT, L'IPN NE MARCHERA PAS.
RewriteCond %{REQUEST_URI} !^/paypal-ipn.php
##
RewriteCond %{HTTP_USER_AGENT} ^-?$ [OR]
## ANONYMES
RewriteCond %{HTTP_USER_AGENT} ^[bcdfghjklmnpqrstvwxz\ ]{8,}|^[0-9a-z]{15,}|^[0-9A-Za-z]{19,}|^[A-Za-z]{3,}\ [a-z]{4,}\ [a-z]{4,} [OR]
## CEUX QUI INVENTENT DES NOMS AU HASARD
RewriteCond %{HTTP_USER_AGENT} ^<sc|<\?|8484\ Boston\ Project|autoemailspider|@nonymouse|ADSARobot|Advanced\ Email\ Extractor|^adwords|ah-ha|aktuelles|amzn_assoc|Anarchie|anonymous|Art-Online|ASPSeek|ASSORT|ATHENS|Atomz|attach|autoemailspider|BackWeb|Bandit|BatchFTP|bdfetch|big.brother|BlackWidow|blogsearchbot-martin|bmclient|Boston\ Project|BravoBrian\ SpiderEngine\ MarcoPolo|Bullseye|bumblebee|capture|CherryPicker|ChinaClaw|CICC|clipping|compatible\ \;|Crescent|Crescent\ Internet|Custo|cyberalert|Deweb|diagem|Digger|Digimarc|DIIbot|DirectUpdate|disco|DISCoFinder|Downloader|Download\ Accelerator|Download\ Demon|Download\ Wonder|Drip|DSurf15a|DTS.Agent|EasyDL|eCatch|echo\ extense|ecollector|efp@gmx\.net|EirGrabber|EmailCollector|EmailSiphon|Email\ Siphon|EmailWolf|Email\ Extractor|Express\ WebPictures|ExtractorPro [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} EyeNetIE|fastlwspider|FavOrg|Favorites\ Sweeper|^Fetch|FEZhead|FileHound|flashget|FlashGet\ WebWasher|FlickBot|fluffy|frontpage|GalaxyBot|Generic|Getleft|GetRight|GetSmart|GetWeb!|GetWebPage|gigabaz|Girafabot|Go!Zilla|go-ahead-got-it|GornKer|Grabber|GrabNet|Grafula|Green\ Research|grub-client|grub\ crawler|hanzoweb|Harvest|hhjhj@yahoo|hloader|HMView|HomePageSearch|HTTPConnect|httpdown|httplib|HttpProxy|HTTP\ agent|http\ generic|HTTrack|ia_archive|IBM_Planetwide|IDBot|id-search|imagefetch|Image\ Stripper|Image\ Sucker|IncyWincy|Indy\ Library|informant|Ingelin|InterGET|InternetLinkAgent|InternetSeer\.com|^Internet\ Explorer|Internet\ Ninja|IPiumBot|Iria|Irvine|Jakarta\ Commons|JBH*Agent [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} JetCar|JOC|JOC\ Web\ Spider|JustView|Kapere|KWebGet|Lachesis|larbin|LeechFTP|LexiBot|lftp|likse|Link*Sleuth|LINKS\ ARoMATIZED|LinkWalker|Mac\ Finder|Mag-Net|Magnet|Mass\ Downloader|MCspider|Microsoft\ URL|Microsoft\ Data|MIDown\ tool|minibot\(NaverRobot\)|Mirror|Missigua|Mister\ PiX|MJ12bot|MMMtoCrawl\/UrlDispatcherLLL|Movable\ Type|Moozilla|^Mozilla$|^MSIE|Murzillo|MSProxy|multithreaddb|nationaldirectory|Navroad|NearSite|NetAnts|NetCarta|NetMechanic|netprospector|NetResearchServer|NetSpider|NetZIP|NetZippy|NetZip\ Downloader|Net\ Vampire|NEWT|nicerspro|NICErsPRO|NPBot|Nutch|Nutscrape/|Octopus|Offline\ Explorer|Offline\ Navigator|OmniExplorer|OpaL|Openfind|OpenTextSiteCrawler [NC,OR]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} TV33_Mercator|UIowaCrawler|URL_Spider_Pro|^user|^User\ Agent:\ |^User-Agent:\ |UtilMind|Vacuum|vagabondo|vayala|visibilitygap|vobsub|VoidEYE|vspider|w3mir|WebaltBot|WebAuto|webbandit|WebCapture|Webclipping|webcollage|webcollector|WebCopier|webcraft@bea|WebDAV|webdevil|webdownloader|Webdup|WebEmailExtractor|WebFetch|WebGo\ IS|WebHook|Webinator|WebLeacher|WEBMASTERS|WebMiner|WebMirror|webmole|WebReaper|WebSauger|WEBsaver|Website\ eXtractor|Website\ Quester|WebSnake|Webster|WebStripper|websucker|webvac|webwalk|webweasel|WebWhacker|WebZIP|Web\ Data\ Extractor|Web\ Downloader|Web\ Image\ Collector|Web\ Sucker|web\.by\.mail|whizbang|WhosTalking|Widow|Widows|WISEbot|WISEnutbot|WUMPUS|Wweb|WWWOFFLE|Wysigot|x-Tractor|Xaldon\ WebSpider|XGET|Yandex|Zeus|Zeus.*Webster [NC]
## VRAIS ET FAUX ROBOTS NE RESPECTANT PAS LES REGLES
RewriteCond %{HTTP_USER_AGENT} ^curl|^Fetch\ API\ Request|GT\:\:WWW|^HTTP\:\:Lite|httplib|^Java/1.|^Java\ 1.|^LWP|libWeb|libwww|^PEAR|PECL\:\:HTTP|PHPCrawl|^Program\ Shareware|python|Rsync|Snoopy|^URI\:\:Fetch|WebDAV|^Wget [NC]
## BIBLIOTHEQUES / CLASSES HTTP DONT ON NE VEUT PAS. ATTENTION, CELA PEUT BLOQUER CERTAINES FONCTIONS DE VOTRE CMS. NE PAS TOUT EFFACER, MAIS CHERCHEZ LE NOM DE LA CLASSE HTTP CONCERNEE (DEMANDEZ AUX DEVELOPPEURS DE VOTRE CMS). CETTE LISTE BLOQUE 80% DES ROBOTS SPAMMEURS. IL FAUT LA CONSERVER.
RewriteRule (.*) - [F]
### DES FAUX URLS, ON LES NEUTRALISE
RedirectMatch gone ^/_vti.*
RedirectMatch gone ^/MSOffice.*
RedirectMatch gone ^[-_a-z0-9/\.]*//.*
RedirectMatch gone ^.*/etc/passwd.*
### FILTRE CONTRE XSS, REDIRECTIONS HTTP, base64_encode, VARIABLE PHP GLOBALS VIA URL, MODIFIER VARIABLE _REQUEST VIA URL, TEST DE FAILLE PHP, INJECTION SQL SIMPLE
RewriteCond %{REQUEST_METHOD} (GET|POST) [NC]
RewriteCond %{QUERY_STRING} ^(.*)(%3C|<)/?script(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)(%3D|=)?javascript(%3A|:)(.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)document\.location\.href(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)(%3D|=)http(%3A|:)(/|%2F){2}(.*)$ [NC,OR]
## ATTENTION A CETTE REGLE. ELLE PEUT CASSER CERTAINES REDIRECTIONS RESSEMBLANT A: http://www.truc.fr/index.php?r=http://www.google.fr ##
RewriteCond %{QUERY_STRING} ^(.*)base64_encode(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)GLOBALS(=|[|%[0-9A-Z]{0,2})(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)_REQUEST(=|[|%[0-9A-Z]{0,2})(.*)$ [OR]
RewriteCond %{QUERY_STRING} ^(.*)(SELECT|INSERT|DELETE|CHAR\(|UPDATE|REPLACE|LIMIT)(.*)$
<FilesMatch "\.(ico|flv|jpe?g|png|gif|js|css|swf)$">
ExpiresActive On
ExpiresDefault "access plus 1 month"
</FilesMatch>
<IfModule mod_deflate.c>
    # Insert filter on all content
    SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</IfModule>
FileETag MTime Size

# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]

#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]

#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]

#OR if the URI contains a "<script>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]

#OR if the script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]

#OR if any script is trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]

#OR if the URI contains UNION
RewriteCond %{QUERY_STRING} UNION [OR]

#OR if the URI contains a double slash
RewriteCond %{QUERY_STRING} // [OR]

#OR if the URI contains a *
RewriteCond %{QUERY_STRING} \*

#then deny the request (403)
RewriteRule ^.*$ - [F,L]

# End URL Filtering
# redirection vers www
RewriteCond %{HTTP_HOST} ^canopee.be$
RewriteRule ^(.*) http://www.canopee.be/$1 [QSA,L,R=301]
# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
ErrorDocument 404 http://www.canopee.be/404vers301.php
# END CMSMS
# END Rewrite rules

Et la ligne qui est sensé faire tout ça
Code :
[== Indéfini ==]
ErrorDocument 404 http://www.canopee.be/404vers301.php

avec ce code php dedans:
Code :
[== PHP ==]
<?php
header("Status: 301 Moved Permanently", false, 301);
header("Location: http://www.canopee.be/index.php");
exit();
?>

Ne fonctionne pas, j'ai toujour une bête page erreur 404.

Quelqu'un peut-il m'aider sur ce point?

Merci!
Cordialement,
Piet
#2
je n'ai jamais vu faire cela donc je ne sais pas si c'est correcte ou pas Sad

perso je redirige page à page des ancienne aux nouvelles :

Citation :#Rediriger les 404 reccurent
RewriteRule ^blog/$ / [R=301,L]
RewriteRule ^uploads/file/tutoriel_CMSMS\.pdf$ http://wiki.cmsmadesimple.fr/wiki/Cat%C3%A9gorie:Guides [R=301,L]
RewriteRule ^forum/viewt$ forum/ [R=301,L]
RewriteRule ^documentation/tutoriels-video$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^404$ index.php?page=404 [R=301,L]
RewriteRule ^statistiques/(.)*$ / [R=301,L]
RewriteRule ^contact\)$ /contact [R=301,L]
RewriteRule ^uploads/doc$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^uploads/doc$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^annuaire-cms/references-cms$ /showroom [R=301,L]
RewriteRule ^references$ /showroom [R=301,L]
RewriteRule ^auto\-moto\-cms$ /showroom [R=301,L]
RewriteRule ^entreprise\-cms$ /showroom [R=301,L]
RewriteRule ^association\-cms$ /showroom [R=301,L]
RewriteRule ^hotellerie\-restauration\-cms$ /showroom [R=301,L]
RewriteRule ^presse\-medias\-politique\-cms$ /showroom [R=301,L]
RewriteRule ^sante\-bien\-etre\-sport\-cms$ /showroom [R=301,L]
RewriteRule ^tele$ /showroom [R=301,L]
RewriteRule ^artisants\-tpe\-cms$ /showroom [R=301,L]
RewriteRule ^administration\-publique\-collectivite\-locale\-cms$ /showroom [R=301,L]
RewriteRule ^blogs\-site\-perso\-cms$ /showroom [R=301,L]
RewriteRule ^uploads/documentation/developpeur/cmsms\-fr\-guide\-developpeur\-documentation\.pdf\)$ uploads/documentation/developpeur/cmsms\-fr\-guide\-developpeur\-documentation\.pdf [R=301,L]
RewriteRule ^undefined/$ / [R=301,L]
RewriteRule ^cafe\-made\-simple\-2$ / [R=301,L]
RewriteRule ^dernieres\-modifications$ / [R=301,L]
RewriteRule ^annuaire\-cms$ http://pro.cmsmadesimple.fr [R=301,L]
RewriteRule ^www\.su3\.fr$ http://asso.cmsmadesimple.fr/ [R=301,L]
RewriteRule ^uploads/download/Module%20Pro%20V1%20_%20Cahier%20des%20charges%2020111010\.pdf$ / [R=301,L]
#2
je n'ai jamais vu faire cela donc je ne sais pas si c'est correcte ou pas Sad

perso je redirige page à page des ancienne aux nouvelles :

Citation :#Rediriger les 404 reccurent
RewriteRule ^blog/$ / [R=301,L]
RewriteRule ^uploads/file/tutoriel_CMSMS\.pdf$ http://wiki.cmsmadesimple.fr/wiki/Cat%C3%A9gorie:Guides [R=301,L]
RewriteRule ^forum/viewt$ forum/ [R=301,L]
RewriteRule ^documentation/tutoriels-video$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^404$ index.php?page=404 [R=301,L]
RewriteRule ^statistiques/(.)*$ / [R=301,L]
RewriteRule ^contact\)$ /contact [R=301,L]
RewriteRule ^uploads/doc$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^uploads/doc$ http://wiki.cmsmadesimple.fr/wiki/Accueil [R=301,L]
RewriteRule ^annuaire-cms/references-cms$ /showroom [R=301,L]
RewriteRule ^references$ /showroom [R=301,L]
RewriteRule ^auto\-moto\-cms$ /showroom [R=301,L]
RewriteRule ^entreprise\-cms$ /showroom [R=301,L]
RewriteRule ^association\-cms$ /showroom [R=301,L]
RewriteRule ^hotellerie\-restauration\-cms$ /showroom [R=301,L]
RewriteRule ^presse\-medias\-politique\-cms$ /showroom [R=301,L]
RewriteRule ^sante\-bien\-etre\-sport\-cms$ /showroom [R=301,L]
RewriteRule ^tele$ /showroom [R=301,L]
RewriteRule ^artisants\-tpe\-cms$ /showroom [R=301,L]
RewriteRule ^administration\-publique\-collectivite\-locale\-cms$ /showroom [R=301,L]
RewriteRule ^blogs\-site\-perso\-cms$ /showroom [R=301,L]
RewriteRule ^uploads/documentation/developpeur/cmsms\-fr\-guide\-developpeur\-documentation\.pdf\)$ uploads/documentation/developpeur/cmsms\-fr\-guide\-developpeur\-documentation\.pdf [R=301,L]
RewriteRule ^undefined/$ / [R=301,L]
RewriteRule ^cafe\-made\-simple\-2$ / [R=301,L]
RewriteRule ^dernieres\-modifications$ / [R=301,L]
RewriteRule ^annuaire\-cms$ http://pro.cmsmadesimple.fr [R=301,L]
RewriteRule ^www\.su3\.fr$ http://asso.cmsmadesimple.fr/ [R=301,L]
RewriteRule ^uploads/download/Module%20Pro%20V1%20_%20Cahier%20des%20charges%2020111010\.pdf$ / [R=301,L]
#3
Comme on ne connait pas l'adresse de ton ancien site, visite ce petit tuto : http://www.siteduzero.com/informatique/t...ction-http
Attention de placer le redirect permanent en haut du fichier (après les setEnv).
#3
Comme on ne connait pas l'adresse de ton ancien site, visite ce petit tuto : http://www.siteduzero.com/informatique/t...ction-http
Attention de placer le redirect permanent en haut du fichier (après les setEnv).
#4
En fait, il s'agit d'anciennes page référencées dans google

Code :
[== Indéfini ==]
www.canopee.be/cours.htm

www.canopee.be/stage.htm

www.canopee.be/index.htm

...

Qui n'existent plus et donc j'ai une erreur 404 Not Found.

J'aimerai que le visiteur qui arrive via ces liens soient redirigés vers la page d'accueil de mon site actuel
Code :
[== Indéfini ==]
www.canopee.be/


J'ai essayé ça:
Code :
[== Indéfini ==]
RewriteRule ^cours$    /index.php [R=301,L]

mais ça marche pas :/

En fait, ça pourrait être monsite/toutes-les-pages.htm redirige vers la racine du site

Quelqu'un peut-il me donner la bonne nomenclature?

Merci beaucoup,
Piet
#4
En fait, il s'agit d'anciennes page référencées dans google

Code :
[== Indéfini ==]
www.canopee.be/cours.htm

www.canopee.be/stage.htm

www.canopee.be/index.htm

...

Qui n'existent plus et donc j'ai une erreur 404 Not Found.

J'aimerai que le visiteur qui arrive via ces liens soient redirigés vers la page d'accueil de mon site actuel
Code :
[== Indéfini ==]
www.canopee.be/


J'ai essayé ça:
Code :
[== Indéfini ==]
RewriteRule ^cours$    /index.php [R=301,L]

mais ça marche pas :/

En fait, ça pourrait être monsite/toutes-les-pages.htm redirige vers la racine du site

Quelqu'un peut-il me donner la bonne nomenclature?

Merci beaucoup,
Piet
#5
Et je me répond à moi même...

En vidant la cache du navigateur, ceci à fonctionné...
Code :
[== Indéfini ==]
RewriteRule ^([^/]*)\.htm$ http://www.canopee.be [R=301,L]
#5
Et je me répond à moi même...

En vidant la cache du navigateur, ceci à fonctionné...
Code :
[== Indéfini ==]
RewriteRule ^([^/]*)\.htm$ http://www.canopee.be [R=301,L]
#6
Si il y a mieux pour le référencement, je suis preneur ! sinon, je clôture...
#6
Si il y a mieux pour le référencement, je suis preneur ! sinon, je clôture...
#7
c'est tout bon alors (oui cette saloperie de cache navigateur ...)
#7
c'est tout bon alors (oui cette saloperie de cache navigateur ...)


Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)