I had to reconfigure the .htaccess for the APACHE server we run a few days ago. J'ai dû reconfigurer le. Htaccess pour le serveur Apache, nous courons, il ya quelques jours.
A few system administrators still dont know how to correctly modify the .htaccess and apply it. A quelques administrateurs système ne sais pas encore comment modifier correctement le fichier. Htaccess et de l'appliquer.
I am including a working template that anybody can use, and it is commented too. Je suis notamment un modèle de travail que n'importe qui peut utiliser, et elle est trop.
For people who want to download get it from here (view it with notepad) : http://www.mediafire.com/?49lxrdqk542 Pour les personnes qui veulent obtenir de télécharger de ici (voir avec le Bloc-notes): http://www.mediafire.com/?49lxrdqk542
The .htaccess is also posted below for anyone to read also, and perhaps see some ideas that might be useful for their servers, or even see there are a few things that can be done without cluttering up the robots.txt. L'. Htaccess est également affichée ci-dessous pour quiconque de lire aussi, et peut-être voir quelques idées qui pourraient être utiles pour leurs serveurs, ou même de le constater, il ya quelques choses qui peuvent être faites sans encombrer le fichier robots.txt. I for one perfer to put most things into the .htaccess because nobody else can see it, where with the robots.txt, anyone can see it and also because spammers and spam bots / spammer user-agents usally ignore the robots.txt file Pour ma part, je perfer à mettre plus de choses dans le fichier. Htaccess parce que personne d'autre ne peut le voir, où avec le fichier robots.txt, tout le monde peut la voir et aussi parce que les spammeurs et les robots collecteurs de mails / spammer "user-agents habituellement ignorer le fichier robots.txt
## DISABLE HOTLINKING # # DISABLE HOTLINKING
RewriteEngine on RewriteEngine on
# Options FollowSymlinks # Options FollowSymLinks
RewriteCond %{HTTP_REFERER} !^$ RewriteCond% (HTTP_REFERER)! ^ $
RewriteCond %{HTTP_REFERER} !^http://(www\.)?PUTyourDomainHERE/.*$ [NC] RewriteCond% (HTTP_REFERER)! ^ Http:// (www \.)? PUTyourDomainHERE / .* $ [NC]
RewriteRule \.(gif|jpg|jpeg|png|js|css)$ - [F] RewriteRule \. (Gif | jpg | jpeg | png | JS | css) $ - [F]
## SITE REFERRER BANNING # # REFERRER INTERDICTION DU SITE
RewriteEngine on RewriteEngine on
# Options FollowSymlinks # Options FollowSymLinks
RewriteCond %{HTTP_REFERER} info\.biyad\.com [NC] RewriteCond%) (HTTP_REFERER info \. Biyad \. Com [NC]
RewriteRule .* - [F] RewriteRule .* - [F]
## USER IP BANNING # # IP INTERDICTION
<Limit GET POST> <Limit EEG POST>
order allow,deny afin de permettre, nier
deny from 74.54.131.194 refuser de 74.54.131.194
allow from all permettre de tous les
</Limit> </ Limit>
## AN EXAMPLE OF A REDIRECT # # Un exemple de redirection
Options Indexes Options Indexes
IndexOptions -FancyIndexing IndexOptions-FancyIndexing
Redirect permanent /www.PUTyourDomainHERE/oldPAGE.html http://www.PUTyourDomainHERE/newPage.html Redirect permanent / www.PUTyourDomainHERE / oldPAGE.html http://www.PUTyourDomainHERE/newPage.html
Redirect permanent /www.PUTyourDomainHERE/OLDPage.html http://www.PUTyourDomainHERE/someNEWdirectory/NewPage.html Redirect permanent / www.PUTyourDomainHERE / OLDPage.html http://www.PUTyourDomainHERE/someNEWdirectory/NewPage.html
RewriteEngine On RewriteEngine on
RewriteBase / RewriteBase /
RewriteCond %{HTTP:IGNORE_INCON846393} !^Yes$ RewriteCond% (HTTP: IGNORE_INCON846393)! Oui ^ $
RewriteCond %{REQUEST_METHOD} ^(GET|POST)$ [NC] RewriteCond% (REQUEST_METHOD) ^ (GET | POST) $ [NC]
RewriteCond %{REQUEST_URI} RewriteCond% (REQUEST_URI)
!.*\.(css|jpg|ai|doc|bin|ogg|mp3|pdf|rtf|ps|ppt|jpeg|png|gif|rar|zip|bz|bz2|gz|tar|iso|chm|z|cue|deb|rpm|ac3|au|snd|mid|midi|wav|bmp|jpe|psd|avi|mpg|mpeg|mpe|mp4|ico|rdf)$ [NC] ! .* \. (CSS | jpg | AI | doc | bin | ogg | mp3 | pdf | rtf | ps | ppt | jpeg | PNG | GIF | rar | zip | BZ | bz2 | gz | tar | ISO | chm | z | cue | deb | tr / min | AC3 | au | snd | mi | MIDI | wav | bmp | jpe | psd | avi | mpg | MPEG | mpe | MP4 | ico | rdf) $ [NC]
## AN EXAMPLE OF A REDIRECT OF DYNAMIC PAGES TO STATIC PAGES # # Un exemple de redirection des pages dynamiques à des pages statiques
RewriteCond %{query_string} ^option=com_content&task=view&id=23$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 23 $
RewriteRule ^index.php$ /page1? RewriteRule ^ index.php $ / page1? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_content&task=view&id=22&Itemid=36$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 22 & Itemid = 36 $
RewriteRule ^index.php$ /page2? RewriteRule ^ index.php $ / page2? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_content&task=view&id=14&Itemid=30$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 14 & Itemid = 30 $
RewriteRule ^index.php$ /page3? RewriteRule ^ index.php $ / page3? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_content&task=view&id=20&Itemid=34$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 20 & Itemid = 34 $
RewriteRule ^index.php$ /page4? RewriteRule ^ index.php $ / page4? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_content&task=view&id=13&Itemid=29$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 13 & Itemid = 29 $
RewriteRule ^index.php$ /page5? RewriteRule ^ index.php $ / page5? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_content&task=view&id=24&Itemid=38$ RewriteCond% (QUERY_STRING) ^ option = com_content & task = View & id = 24 & Itemid = 38 $
RewriteRule ^index.php$ /page6? RewriteRule ^ index.php $ / page6? [R=301,L] [R = 301, L]
RewriteCond %{query_string} ^option=com_sefservicemap&Itemid=37$ RewriteCond% (QUERY_STRING) ^ option = com_sefservicemap & Itemid = 37 $
RewriteRule ^index.php$ /sitemap.html? RewriteRule ^ index.php $ / sitemap.html? [R=301,L] [R = 301, L]
## AN EXAMPLE OF A PERMANENT REDIRECTs AKA 301 # # Un exemple d'un alias redirections permanentes 301
redirect 301 /oldpage.html http://www.yourDOMAIN/newpage.html redirection 301 / oldpage.html http://www.yourDOMAIN/newpage.html
redirect 301 /oldpage2.html http://www.yourDOMAIN/newpage2.html redirection 301 / oldpage2.html http://www.yourDOMAIN/newpage2.html
redirect 301 /oldpage3.html http://www.yourDOMAIN/newpage3.html redirection 301 / oldpage3.html http://www.yourDOMAIN/newpage3.html
redirect 301 /oldpage4.html http://www.yourDOMAIN/newpage4.html redirection 301 / oldpage4.html http://www.yourDOMAIN/newpage4.html
## A WORKING EXAMPLE OF BLOCKING BAD BOTS OR USER AGENTS KNOWN TO BE RELATED TO SPAM # # Un exemple de travail de blocage ou de mauvais robots utilisateur agents connus pour être liés au spam
SetEnvIfNoCase User-Agent “^EmailSiphon” bad_bot SetEnvIfNoCase User-Agent "^ EmailSiphon" bad_bot
SetEnvIfNoCase User-Agent “^EmailWolf” bad_bot SetEnvIfNoCase User-Agent "^ EmailWolf" bad_bot
SetEnvIfNoCase User-Agent “^ExtractorPro” bad_bot SetEnvIfNoCase User-Agent "^ ExtractorPro" bad_bot
SetEnvIfNoCase User-Agent “^CherryPicker” bad_bot SetEnvIfNoCase User-Agent "^ CherryPicker" bad_bot
SetEnvIfNoCase User-Agent “^NICErsPRO” bad_bot SetEnvIfNoCase User-Agent "^ NICErsPRO" bad_bot
SetEnvIfNoCase User-Agent “^Teleport” bad_bot SetEnvIfNoCase User-Agent "^ Teleport" bad_bot
SetEnvIfNoCase User-Agent “^EmailCollector” bad_bot SetEnvIfNoCase User-Agent "^ EmailCollector" bad_bot
SetEnvIfNoCase User-Agent “^LinkWalker” bad_bot SetEnvIfNoCase User-Agent "^ LinkWalker" bad_bot
SetEnvIfNoCase User-Agent “^Zeus” bad_bot SetEnvIfNoCase User-Agent "^ Zeus" bad_bot
<Limit GET POST> <Limit EEG POST>
Order Allow,Deny Afin de permettre, nier
Allow from all Permettre de tous les
Deny from env=bad_bot Refuser de env = bad_bot
</Limit> </ Limit>
written by admin \\ tags: apache , apache .htaccess , htaccess , htaccess hacking , mod rewrite , paul walsh , paul walsh blog , paul walsh security , protocol solutions , protocol solutions blog , robots écrit par admin \ \ tags: apache, apache. htaccess, htaccess, htaccess piratage, mod réécrire, Paul Walsh, Paul Walsh blog, Paul Walsh de sécurité, des solutions de protocole, le protocole de solutions blog, les robots