Problème .htaccess

Nouveau WRInaute
Bonjour, j'ai un problème avec mon .htaccess sur le serveurs d'ovh avec cette règle de réécriture quand je tape http://undergrot.cluster015.ovh.net/brandnews/ je tombe sur le fichier brandnews.php au lieu de liste-brandnews.php :

Code:
RewriteRule   ^brandnews/$ liste-brandnews.php [L]
RewriteRule   ^brandnews/([a-z0-9-]+)/$ brandnews.php?url=$1 [L]

Par contre si je change la réécriture par ceci par exemple je n'est plus ce problème :

Code:
RewriteRule   ^music/$ liste-brandnews.php [L]
RewriteRule   ^music/([a-z0-9-]+)/$ brandnews.php?url=$1 [L]

Mon fichier htaccess complet :

Code:
AddDefaultCharset UTF-8



RewriteEngine on



RewriteRule   ^brandnews/$ liste-brandnews.php [L]

RewriteRule   ^brandnews/order/([a-z-]+)/$ liste-brandnews.php?order=$1 [L]

RewriteRule   ^brandnews/page/([0-9]+)/$ liste-brandnews.php?p=$1 [L]

RewriteRule   ^brandnews/order/([a-z-]+)/page/([0-9]+)/$ liste-brandnews.php?order=$1&p=$2 [L]

RewriteRule   ^brandnews/([a-z0-9-]+)/$ brandnews.php?url=$1 [L]



RewriteRule   ^videos/$ liste-videos.php [L]

RewriteRule   ^videos/order/([a-z-]+)/$ liste-videos.php?order=$1 [L]

RewriteRule   ^videos/([a-z0-9-]+)/$ video.php?url=$1 [L]

RewriteRule   ^videos/page/([0-9]+)/$ liste-videos.php?p=$1 [L]

RewriteRule   ^videos/order/([a-z-]+)/page/([0-9]+)/$ liste-videos.php?order=$1&p=$2 [L]

RewriteRule   ^videos/(SD|HD)/([a-z0-9-]+)/$ video.php?url=$2&hd=$1 [L]



RewriteRule   ^instrumentals/$ liste-instrumentals.php [L]

RewriteRule   ^instrumentals/order/([a-z-]+)/$ liste-instrumentals.php?order=$1 [L]

RewriteRule   ^instrumentals/page/([0-9]+)/$ liste-instrumentals.php?p=$1 [L]

RewriteRule   ^instrumentals/order/([a-z-]+)/page/([0-9]+)/$ liste-instrumentals.php?order=$1&p=$2 [L]

RewriteRule   ^instrumentals/([a-z0-9-]+)/$ instrumental.php?url=$1 [L]



RewriteRule   ^mixtapes/$ liste-mixtapes.php [L]

RewriteRule   ^mixtapes/order/([a-z-]+)/$ liste-mixtapes.php?order=$1 [L]

RewriteRule   ^mixtapes/page/([0-9]+)/$ liste-mixtapes.php?p=$1 [L]

RewriteRule   ^mixtapes/order/([a-z-]+)/page/([0-9]+)/$ liste-mixtapes.php?order=$1&p=$2 [L]

RewriteRule   ^mixtapes/([a-z0-9-]+)/$ mixtape.php?url=$1 [L]



RewriteRule   ^artistes/$ liste-bloks.php [L]

RewriteRule   ^artistes/order/([a-z-]+)/$ liste-bloks.php?order=$1 [L]

RewriteRule   ^artistes/page/([0-9]+)/$ liste-bloks.php?p=$1 [L]

RewriteRule   ^artistes/order/([a-z-]+)/page/([0-9]+)/$ liste-bloks.php?order=$1&p=$2 [L]

RewriteRule   ^artistes/([a-z0-9-]+)/$ blok.php?url=$1 [L]



RewriteRule   ^beatmakers/$ beats.php [L]

RewriteRule   ^beatmakers/order/([a-z-]+)/$ beats.php?order=$1 [L]

RewriteRule   ^beatmakers/page/([0-9]+)/$ beats.php?p=$1 [L]

RewriteRule   ^beatmakers/order/([a-z-]+)/page/([0-9]+)/$ beats.php?order=$1&p=$2 [L]

RewriteRule   ^beatmakers/([a-z0-9-]+)/$ beats.php?url=$1 [L]



RewriteRule   ^pages/([a-z0-9-]+)/$ pages.php?url=$1 [L]



RewriteRule   ^compte/([a-z-]+)/$ compte.php?action=$1 [L]

RewriteRule   ^compte/production/(brandnews|videos|instrumentals|mixtapes)/(edit|supp)/([0-9]+)/$ edit.php?cat=$1&action=$2&id=$3 [L]



RewriteRule   ^publish/([a-z-]+)/$ publish.php?cat=$1 [L]



RewriteRule   ^rss/$ rss2.php [L]



RewriteRule   ^([0-9]+)$ error.php?error=$1 [L]



ErrorDocument 400 http://www.undergroundlokal.com/400

ErrorDocument 401 http://www.undergroundlokal.com/401

ErrorDocument 404 http://www.undergroundlokal.com/404

ErrorDocument 405 http://www.undergroundlokal.com/405

ErrorDocument 500 http://www.undergroundlokal.com/500

ErrorDocument 501 http://www.undergroundlokal.com/501

ErrorDocument 502 http://www.undergroundlokal.com/502

ErrorDocument 503 http://www.undergroundlokal.com/503

ErrorDocument 504 http://www.undergroundlokal.com/504

ErrorDocument 505 http://www.undergroundlokal.com/505



# Mesure de sécurité

Options -Indexes

<Files .htaccess>

order allow,deny

deny from all

</Files>



###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} OrangeBot|PackRat|PageGrabber|Papa\ Foto|pavuk|pcBrowser|PersonaPilot|PingALink|Pockey|Program\ Shareware|Proxy|psbot|PSurf|psycheclone|^puf|Pump|PushSite|PussyCat|PycURL|python|QRVA|QuepasaCreep|RealDownload|Reaper|Recorder|ReGet|replacer|RepoMonkey|almaden|Robozilla|Rover|RPT-HTTPClient|Rsync|SearchExpress|searchhippo|searchterms\.it|Second\ Street\ Research|Seeker|Shai|sitecheck|SiteMapper|SiteSnagger|SlySearch|SmartDownload|snagger|SpaceBison|Spegla|SpiderBot|SqWorm|Star\ Downloader|Stripper|sucker|SuperBot|SuperHTTP|Surfbot|SurfWalker|SurveyBot|Szukacz|tAkeOut|tarspider|Teleport\ Pro|Telesoft|Templeton|TrackBack|TrueRobot|Turing|TurnitinBot [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]



### SEUL LE FICHIER index.php EST SERVI COMME PREMIER FICHIER PAR DEFAUT. LES AUTRES SONT INTERDITS

DirectoryIndex index.php



### INTERDIRE LES AUTRES TYPES DE FICHIER INDEX

<Files ~ "^(index)\.(p?s?x?htm?|txt|aspx?|cfml?|cgi|pl|php[3-9]|jsp)$">

order allow,deny

deny from all

</Files>



### INTERDIRE L'AFFICHAGE DE CERTAINS FORMATS DE FICHIER 

### EXÉCUTÉS PAR LE SERVEUR MAIS INTERDIT D'AFFICHAGE PAR LE NAVIGATEUR WEB

<Files ~ "\.(inc|class|sql|ini|conf|exe|dll|bin|tpl|bkp|dat|c|h|py|spd|theme|module)$">

deny from all

</Files>



### ON EVITE LE VOL D'IMAGES, VIDEO, SON, FEUILLE DE STYLE, PDF ET ZIP

### LES VISITEURS DOIVENT PASSER PAR LE SITE. 

RewriteCond %{HTTP_REFERER} !^$ 

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*undergroundlokal\.com$ [NC] 

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*undergroundlokal\.com/.*$ [NC]

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*facebook\.com$ [NC] 

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*facebook\.com/.*$ [NC]

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*localhost$ [NC] 

RewriteCond %{HTTP_REFERER} !^http://[-_a-z0-9.]*localhost/.*$ [NC]

RewriteRule .*\.(gif|jpe?g?|jp2|png|svgz?|ico|css|pdf|zip|gz|js|m4a|mp4|mov|divx|avi|wma?v?|wmp|flv|docx?|xlsx?|pptx?|vbs|rtf|asf?x?|odt|ods|odp|odg|odb)$ - [NC,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=https://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)(.*)$

RewriteRule (.*) - [F]



### FILTRE CONTRE PHPSHELL.PHP, REMOTEVIEW, c99Shell et autres

RewriteCond %{REQUEST_URI} .*((php|my)?shell|remview.*|phpremoteview.*|sshphp.*|pcom|nstview.*|c99|r57|webadmin.*|phpget.*|phpwriter.*|fileditor.*|locus7.*|storm7.*)\.(p?s?x?htm?l?|txt|aspx?|cfml?|cgi|pl|php[3-9]{0,1}|jsp?|sql|xml) [NC,OR]

RewriteCond %{REQUEST_METHOD} (GET|POST) [NC]

RewriteCond %{QUERY_STRING} ^(.*)=/home(.+)?/loginftp/(.*)$ [OR]

RewriteCond %{QUERY_STRING} ^work_dir=.*$ [OR]

RewriteCond %{QUERY_STRING} ^command=.*&output.*$ [OR]

RewriteCond %{QUERY_STRING} ^nts_[a-z0-9_]{0,10}=.*$ [OR]

RewriteCond %{QUERY_STRING} ^(.*)cmd=.*$ [OR] ## ATTENTION A CETTE REGLE. ELLE PEUT CASSER VOTRE SITE ##

RewriteCond %{QUERY_STRING} ^c=(t|setup|codes)$ [OR]

RewriteCond %{QUERY_STRING} ^act=((about|cmd|selfremove|chbd|trojan|backc|massbrowsersploit|exploits|grablogins|upload.*)|((chmod|f)&f=.*))$ [OR]

RewriteCond %{QUERY_STRING} ^act=(ls|search|fsbuff|encoder|tools|processes|ftpquickbrute|security|sql|eval|update|feedback|cmd|gofile|mkfile)&d=.*$ [OR]

RewriteCond %{QUERY_STRING} ^&?c=(l?v?i?&d=|v&fnot=|setup&ref=|l&r=|d&d=|tree&d|t&d=|e&d=|i&d=|codes|md5crack).*$ [OR]

RewriteCond %{QUERY_STRING} ^(.*)([-_a-z]{1,15})=(ls|cd|cat|rm|mv|vim|chmod|chdir|mkdir|rmdir|pwd|clear|whoami|uname|tar|zip|unzip|tar|gzip|gunzip|grep|more|ln|umask|telnet|ssh|ftp|head|tail|which|mkmode|touch|logname|edit_file|search_text|find_text|php_eval|download_file|ftp_file_down|ftp_file_up|ftp_brute|mail_file|mysql|mysql_dump|db_query)([^a-zA-Z0-9].+)*$ [OR]

RewriteCond %{QUERY_STRING} ^(.*)(wget|shell_exec|passthru|system|exec|popen|proc_open)(.*)$

RewriteRule (.*) - [F]



# IP INTERDIT

order allow,deny

deny from 110.136.201.146

deny from 82.234.67.245

deny from 113.162.246.178

deny from 66.249.66.88

deny from 92.157.67.15

deny from 182.3.34.130

deny from 118.96.9.218

deny from 182.23.10.170

deny from 220.181.141.69

deny from 157.55.16.57

deny from 90.42.76.186

deny from 202.58.86.15

deny from 50.18.81.109

deny from 206.53.148.208

deny from 70.95.137.106

deny from 125.234.144.26

deny from 86.211.168.42

deny from 67.182.204.62

deny from 58.187.22.106

deny from 80.69.208.57

deny from 180.245.238.130

deny from 78.170.213.241

deny from itirafsitesi.com

deny from 60.52.31.246

deny from topx17.tk

deny from 125.165.18.233

deny from 89.85.151.3

deny from anime-space.org

deny from 90.3.41.109

deny from lalegendedenarutohentai.com

deny from kredos.com

deny from 65.36.241.79

deny from 46.8.146.206

deny from myphamhanquoc.net

deny from 89.92.87.17

deny from 116.102.3.250

allow from all
 
Discussions similaires
Haut