<?xml 
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
>

<channel xml:lang="fr">
	<title>Abdel ELGHAFOUD - CV - Ing&#233;nieur Etudes et D&#233;veloppement informatique</title>
	<link>http://www.elghafoud.net/</link>
	<description>Sp&#233;cialiste dans le d&#233;veloppement Web, PHP(4, 5), MySQL, JavaScript, JQuery, Zend Framework, SPIP, Drupal</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>




<item xml:lang="fr">
		<title>Merge statement in oracle 9i</title>
		<link>http://www.elghafoud.net/Merge-statement-in-oracle-9i.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Merge-statement-in-oracle-9i.html</guid>
		<dc:date>2011-08-25T12:52:17Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Dans l'exemple suivant, la requette pour fusionner l=une table source avec une table cible : SQL&gt; MERGE 2 INTO target_table tgt 3 USING source_table src 4 ON ( src.object_id = tgt.object_id ) 5 WHEN MATCHED 6 THEN 7 UPDATE 8 SET tgt.object_name = src.object_name 9 , tgt.object_type = src.object_type 10 WHEN NOT MATCHED 11 THEN 12 INSERT ( tgt.object_id 13 , tgt.object_name 14 , tgt.object_type ) 15 (...)

-
&lt;a href="http://www.elghafoud.net/-Oracle-.html" rel="directory"&gt;Oracle&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Dans l'exemple suivant, la requette pour fusionner l=une table source avec une table cible :&lt;/p&gt; &lt;pre&gt;
SQL&gt; MERGE 2 INTO target_table tgt 3 USING source_table src 4 ON ( src.object_id = tgt.object_id ) 5 WHEN MATCHED 6 THEN 7 UPDATE 8 SET tgt.object_name = src.object_name 9 , tgt.object_type = src.object_type 10 WHEN NOT MATCHED 11 THEN 12 INSERT ( tgt.object_id 13 , tgt.object_name 14 , tgt.object_type ) 15 VALUES ( src.object_id 16 , src.object_name 17 , src.object_type ) ;
&lt;p&gt;86889 rows merged.&lt;/p&gt;
&lt;/pre&gt;
&lt;p&gt;Plus d'info : &lt;a href='http://www.oracle-developer.net/display.php?id=203' class='spip_out' rel='nofollow external'&gt;http://www.oracle-developer.net/dis...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Maroc-Alg&#233;rie du 4 juin - liste des 23 joueurs retenus</title>
		<link>http://www.elghafoud.net/Maroc-Algerie-du-4-juin-liste-des.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Maroc-Algerie-du-4-juin-liste-des.html</guid>
		<dc:date>2011-05-24T08:03:32Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Voici la liste des joueurs marocains retenus pour le match retour Maroc-Alg&#233;rie qui aura le 4 juin 2011 Gardiens : Nadir Lamyaghri (Wydad/Maroc), Issam Badda (FUS/Maroc), Ahmed Mohammedina (OCK/Maroc) D&#233;fenseurs : Mehdi Benatia (Udinese/Italie), Jamal Alioui (Wydad/Maroc), Michael Basser Chr&#233;tien (Nancy/France), Ayoub El Khaliqui (Wydad/Maroc), Abdelhamid El Kaoutari (Montpellier/France), Badr El Kaddouri (Dynamo Kiev/Ukraine), Moustapha Lamrani (MAS/Maroc), Mohamed Oulhaj (Raja/Maroc) (...)

-
&lt;a href="http://www.elghafoud.net/-Football-.html" rel="directory"&gt;Football&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;Voici la liste des joueurs marocains retenus pour le match retour Maroc-Alg&#233;rie qui aura le 4 juin 2011&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Gardiens &lt;/strong&gt; : Nadir Lamyaghri (Wydad/Maroc), Issam Badda (FUS/Maroc), Ahmed Mohammedina (OCK/Maroc)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;D&#233;fenseurs &lt;/strong&gt; : Mehdi Benatia (Udinese/Italie), Jamal Alioui (Wydad/Maroc), Michael Basser Chr&#233;tien (Nancy/France), Ayoub El Khaliqui (Wydad/Maroc), Abdelhamid El Kaoutari (Montpellier/France), Badr El Kaddouri (Dynamo Kiev/Ukraine), Moustapha Lamrani (MAS/Maroc), Mohamed Oulhaj (Raja/Maroc)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Milieux &lt;/strong&gt; : Oussama Assaidi (Heerenveen/Hollande), Younes Belhanda (Montpellier/France), Mohamed Berrabeh (Wydad/Maroc), Mbark Boussoufa (Anzhi/Russie), Mohamed Chihani (MAS/Maroc), Adil Hermach (Lens/France), Houcine Kharja (Inter Milan/Italie), Adel Taarabt (Queen's Park Rangers/Angleterre),Youssouf Hadji (Nancy/France)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Attaquants &lt;/strong&gt; : Marouane Chamakh (Arsenal/Angleterre), Mounir El Hamdaoui (Ajax Amsterdam/Hollande), Youssef El Arabi (Caen/France).&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>.htaccess tips and tricks..</title>
		<link>http://www.elghafoud.net/htaccess-tips-and-tricks.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/htaccess-tips-and-tricks.html</guid>
		<dc:date>2011-05-20T12:12:38Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>[FR] Ceci une juste une copie d&amp;#39;un tuto que j&amp;#39;ai trouv&#233; tr&#232;s tr&#232;s interessant [EN] This just a copy of a tutorial that I found very very interesting redirecting and rewriting &quot;The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.&quot; - Brian Behlendorf, Apache Group One of the more powerful tricks (...)

-
&lt;a href="http://www.elghafoud.net/-Tutoriaux-.html" rel="directory"&gt;Tutoriaux&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	&lt;strong&gt;&lt;em&gt;&lt;u&gt;[FR] Ceci une juste une copie d&amp;#39;un tuto que j&amp;#39;ai trouv&#233; tr&#232;s tr&#232;s interessant&lt;br /&gt; &lt;br /&gt; [EN] This just a copy of a tutorial that I found very very interesting&lt;br /&gt; &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;h2&gt; redirecting and rewriting&lt;/h2&gt;
&lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;quote-intro&quot;&gt; &lt;em&gt;&quot;The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.&quot;&lt;/em&gt;&lt;br /&gt; &lt;br /&gt; &lt;div class=&quot;right&quot;&gt; - Brian Behlendorf, Apache Group&lt;/div&gt; &lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-intro&quot;&gt; &lt;/div&gt;
&lt;div id=&quot;intro&quot;&gt; One of the more powerful tricks of the .htaccess hacker is the ability to rewrite URLs. This enables us to do some mighty manipulations on our links ; useful stuff like transforming very long URL&amp;#39;s into short, cute URLs, transforming dynamic &lt;span class=&quot;urltxt&quot;&gt; ?generated=page&amp;URL&amp;#39;s&lt;/span&gt; into /friendly/flat/links, redirect missing pages, preventing hot-linking, performing automatic language translation, and much, much more.&lt;br /&gt; &lt;br /&gt; Make no mistake, &lt;tt&gt;mod_rewrite&lt;/tt&gt; is &lt;em&gt;complex&lt;/em&gt;. This isn&amp;#39;t the subject for a quick bite-size tech-snack, probably not even a week-end crash-course, I&amp;#39;ve seen guys pull off some real cute stuff with &lt;tt&gt;mod_rewrite&lt;/tt&gt;, but with kudos-hat tipped firmly towards that bastard operator from hell, Ralf S. Engelschall, author of the magic module itself, I have to admit that a great deal of it still seems so much voodoo to me.&lt;br /&gt; &lt;br /&gt; The way that rules can work one minute and then seem not to the next, how browser and other in-between network caches interact with rules and testing rules is often baffling, maddening. When I feel the need to bend my mind completely out of shape, I mess around with &lt;tt&gt;mod_rewrite&lt;/tt&gt; !&lt;br /&gt; &lt;br /&gt; After all this, it does work, and while I&amp;#39;m not planning on taking that week-end crash-course any time soon, I have picked up a few wee tricks myself, messing around with web servers and web sites, this place.. &lt;br /&gt; &lt;br /&gt; The plan here is to just drop some neat stuff, examples, things that have proven useful, and work on a variety of server setups ; there are Apache&amp;#39;s all over my LAN, I keep coming across old .htaccess files stuffed with past rewriting experiments that either worked ; and I add them to my list, or failed dismally ; and I&amp;#39;m surprised that more often these days, I can &lt;em&gt;see exactly why !&lt;/em&gt;&lt;br /&gt; &lt;br /&gt; Very little here is my own &lt;a id=&quot;this-article-MIRRORED-hahahah-worldwide&quot; title=&quot;well, okay, a couple of things I did 'invent' - the auto-translation came to me in a dream, and then there's - a limit to anchor titles! ;o)&quot;&gt;invention&lt;/a&gt;. Even the bits I figured out myself were already well documented, I just hadn&amp;#39;t understood the documents, or couldn&amp;#39;t find them. Sometimes, just looking at the same thing from a different angle can make all the difference, so perhaps this humble stab at URL Rewriting might be of some use. I&amp;#39;m writing it for me, of course. but I do get some credit for this..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;intro-time-to-get-dynamic&quot;&gt; &lt;cadre&gt;# time to get dynamic, see..&lt;br /&gt; RewriteRule (.*)\.htm $1.php&lt;br /&gt; &lt;/cadre &gt;&lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;tiny-space&quot; id=&quot;section-beginning&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; beginning rewriting..&lt;/h3&gt;
&lt;div id=&quot;beginning&quot;&gt; Whenever you use &lt;tt&gt;mod_rewrite&lt;/tt&gt; (the part of Apache that does all this magic), you need to do..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-follow-symlinks&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; you only need to do this once per .htaccess file :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; ..before any ReWrite rules. &lt;strong&gt;note :&lt;/strong&gt; &lt;tt&gt;+FollowSymLinks&lt;/tt&gt; &lt;strong&gt;must&lt;/strong&gt; be enabled for &lt;em&gt;any&lt;/em&gt; rules to work, this is a security requirement of the rewrite engine. Normally it&amp;#39;s enabled in the root and you shouldn&amp;#39;t have to add it, but it doesn&amp;#39;t hurt to do so, and I&amp;#39;ll insert it into all the examples on this page, just in case*. &lt;br /&gt; &lt;br /&gt; The next line simply switches on the rewrite engine for that folder. if this &lt;a title=&quot;any instruction for a server, either in an httpd.conf, a php.ini, or an .htaccess file is called a 'directive'&quot;&gt;directive&lt;/a&gt; is in you main .htaccess file, then the ReWrite engine is theoretically enabled for your entire site, but it&amp;#39;s wise to always add that line before you write any redirections, &lt;em&gt;anywhere&lt;/em&gt;.&lt;br /&gt; &lt;br /&gt; &lt;small&gt;&lt;strong&gt;* &lt;/strong&gt;Although highly unlikely, your host may have &lt;tt&gt;+FollowSymLinks&lt;/tt&gt; enabled at the root level, yet &lt;em&gt;disallow&lt;/em&gt; its addition in .htaccess ; in which case, adding &lt;tt&gt;+FollowSymLinks&lt;/tt&gt; will break your setup (probably a 500 error), so just remove it, and your rules should work fine.&lt;/small&gt;&lt;br /&gt; &lt;br /&gt; &lt;small&gt;&lt;strong&gt;Important :&lt;/strong&gt; While some of the directives on this page may appear split onto two lines in your browser, in your .htaccess file they &lt;em&gt;must&lt;/em&gt; exist completely on one line. If you drag-select and copy the directives on this page, they should paste just fine into any text editor.&lt;/small&gt;&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-simple_rewriting&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; simple rewriting&lt;/h3&gt;
&lt;div id=&quot;simple&quot;&gt; Simply put, Apache scans all incoming URL requests, checks for matches in our .htaccess file and rewrites those matching URLs to whatever we specify. something like this..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-htm-to-php&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; all requests to whatever.htm will be sent to whatever.php :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.*)\.htm$ $1.php [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Handy for anyone updating a site from static htm (you could use .html, or .htm(.*), .htm ?, etc) to dynamic php pages ; requests to the old pages are automatically rewritten to our new urls. no one notices a thing, visitors and search engines can access your content either way. leave the rule in ; as an added bonus, this enables us to easily split php code and its included html structures into two separate files, a nice idea ; makes editing and updating a breeze. The [NC] part at the end means &quot;No Case&quot;, or &quot;case-insensitive&quot; ; more on the switches, later.&lt;br /&gt; &lt;br /&gt; Folks can link to whatever.htm or whatever.php, but they always get whatever.php in their browser, and this works even if whatever.htm doesn&amp;#39;t exist ! But I&amp;#39;m straying..&lt;br /&gt; &lt;br /&gt; As it stands, it&amp;#39;s a bit tricky ; folks will still have whatever.htm in their browser address bar, and will still keep bookmarking your old .htm URL&amp;#39;s. Search engines, too, will keep on indexing your links as .htm, some have even argued that serving up the same content from two different places could have you &lt;em&gt;penalized&lt;/em&gt; by the search engines. This may or not bother you, but if it does, &lt;tt&gt;mod_rewrite&lt;/tt&gt; can do some more magic..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-htm-to-php-permanent&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; this will do a &quot;real&quot; external redirection :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.+)\.htm$ &lt;a href='http://corz.org/$1.php' class='spip_out' rel='nofollow external'&gt;http://corz.org/$1.php&lt;/a&gt; [R,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; This time we instruct &lt;tt&gt;mod_rewrite&lt;/tt&gt; to do a proper external rewrite, aka, &quot;redirection&quot;. Now, instead of just background rewriting on-the-fly, the user&amp;#39;s browser is physically redirected to a new URI, and &lt;tt&gt;whatever.php &lt;/tt&gt;appears in their browser&amp;#39;s address bar - search engines and other spidering entities will automatically update their links to the .php versions ; everyone wins. You can take your time with the updating, too.&lt;br /&gt; &lt;br /&gt; Note : if you use &lt;tt&gt;[R]&lt;/tt&gt; alone, it defaults to sending an HTTP &quot;MOVED TEMPORARILY&quot; redirection, aka, &quot;302&quot;. But you can send other codes, like so..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-htm-to-php-permanent-301&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; this performs the exact same as the previous example RewriteRule.&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteRule ^(.+)\.htm$ &lt;a href='http://corz.org/$1.php' class='spip_out' rel='nofollow external'&gt;http://corz.org/$1.php&lt;/a&gt; [R=302,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Okay, I sent the exact same code, but I didn&amp;#39;t &lt;em&gt;have&lt;/em&gt; to. For details of the many &lt;tt&gt;30*&lt;/tt&gt; response codes you can send, see &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot; id=&quot;link-http-response-codes&quot; title=&quot;Stick with the 300 range!&quot;&gt;here&lt;/a&gt;. Most people seem to want to send &lt;tt&gt;301&lt;/tt&gt;, aka, &quot;MOVED PERMENENTLY&quot;. &lt;br /&gt; &lt;br /&gt; Note : if you add an &quot;L&quot; flag to the mix ; meaning &quot;Last Rule&quot;, e.g. &lt;tt&gt;[R=302,NC,L]&lt;/tt&gt; ; Apache will stop processing rules &lt;em&gt;for this request&lt;/em&gt; at that point, which may or may not be what you want. Either way, it&amp;#39;s useful to know.&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-not_so_simple&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; not-so-simple rewriting ... flat links and more&lt;/h3&gt;
&lt;div id=&quot;not-so-simple&quot;&gt; You may have noticed, the above examples use &lt;em&gt;&lt;a title=&quot;mod_rewrite uses POSIX standard regular expressions&quot;&gt;regular expression&lt;/a&gt;&lt;/em&gt; to match variables. What that simply means is.. match the part inside (.+) and use it to construct &quot;$1&quot; in the new URL. In other words, (.+) = $1 you could have multiple (.+) parts and for each, &lt;tt&gt;mod_rewrite&lt;/tt&gt; automatically creates a matching $1, $2, $3, etc, in your target (aka. &amp;#39;substitution&amp;#39;) URL. This facility enables us to do all sorts of tricks, and the most common of those, is the creation of &quot;flat links&quot;..&lt;br /&gt; &lt;br /&gt; Even a cute short link like &lt;span class=&quot;urltxt&quot;&gt;http://mysite/grab?file=my.zip&lt;/span&gt; is too ugly for some people, and nothing less than a true old-school solid &lt;span class=&quot;urltxt&quot;&gt;domain/path/flat/link&lt;/span&gt; will do. Fortunately, &lt;tt&gt;mod_rewrite&lt;/tt&gt; makes it easy to convert URLs with query strings and multiple variables into exactly this, something like..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-with-regex&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; a more complex rewrite rule :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^files/([^/]+)/([^/]+).zip /download.php ?section=$1&amp;file=$2 [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; would allow you to present this link as..&lt;br /&gt; &lt;br /&gt; &lt;span class=&quot;urltxt&quot;&gt; http://mysite/files/games/hoopy.zip&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; and in the background have that transparently translated, server-side, to..&lt;br /&gt; &lt;br /&gt; &lt;span class=&quot;urltxt&quot;&gt; http://mysite/download.php?section=games&amp;file=hoopy&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; which some script could process. You see, many search engines simply don&amp;#39;t follow our &lt;span class=&quot;urltxt&quot;&gt; ?generated=links&lt;/span&gt;, so if you create generating pages, this is useful. However, it&amp;#39;s only the dumb search engines that can&amp;#39;t handle these kinds of links ; we have to ask ourselves.. do we really want to be listed by the dumb search engines ? &lt;a href=&quot;http://www.google.com/&quot; title=&quot;the world's number one search engine&quot;&gt;Google&lt;/a&gt; will handle a good few parameters in your URL without any problems, and the (hungry hungry) &lt;a href=&quot;http://search.msn.com/msnbot.htm&quot; title=&quot;many now have .htaccess deny rules in place for this voracious page-guzzler!&quot;&gt;msn-bot&lt;/a&gt; stops at nothing to &lt;em&gt;get that page&lt;/em&gt;, sometimes again and again and again&#8230;&lt;br /&gt; &lt;br /&gt; I personally feel it&amp;#39;s the search engines that should strive to keep up with modern web technologies, in other words ; we shouldn&amp;#39;t have to dumb-down for them. But that&amp;#39;s just my opinion. Many &lt;em&gt;users&lt;/em&gt; will prefer &lt;span class=&quot;urltxt&quot;&gt;/files/games/hoopy.zip&lt;/span&gt; to &lt;span class=&quot;urltxt&quot;&gt;/download.php ?section=games&amp;file=hoopy&lt;/span&gt; but I don&amp;#39;t mind either way. As someone pointed out to me recently, presenting links as &lt;span class=&quot;urltxt&quot;&gt;standard/flat/paths&lt;/span&gt; means you&amp;#39;re less likely to get folks doing typos in typed URL&amp;#39;s, so something like..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-more-comlex-regex&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; an even more complex rewrite rule :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^blog/([0-9]+)-([a-z]+) &lt;a href='http://corz.org/blog/index.php?archive=$1-$2' class='spip_out' rel='nofollow external'&gt;http://corz.org/blog/index.php?arch...&lt;/a&gt; [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; would be a neat trick, enabling anyone to access my blog archives by doing..&lt;br /&gt; &lt;br /&gt; &lt;a href=&quot;http://corz.org/blog/2003-nov&quot; title=&quot;any excuse for an inward link!&quot;&gt;&lt;span class=&quot;urltxt&quot;&gt;http://corz.org/blog/2003-nov&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; in their browser, and have it automagically transformed server-side into..&lt;br /&gt; &lt;br /&gt; &lt;a href=&quot;http://corz.org/blog/index.php?archive=2003-nov&quot; title=&quot;ditto!&quot;&gt;&lt;span class=&quot;urltxt&quot;&gt;http://corz.org/blog/index.php?archive=2003-nov&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; which &lt;a href=&quot;http://corz.org/blog/&quot; title=&quot;drop-in-and-blog blogging software from corz.org&quot;&gt;corzblog&lt;/a&gt; would understand. It&amp;#39;s easy to see that with a little imagination, and a basic understanding of &lt;a href=&quot;http://www.google.com/search?q=posix+regular+expression+syntax&quot; title=&quot;understanding regex will empower you in ways you would not imagine&quot;&gt; posix regular expression&lt;/a&gt;, you can perform some highly cool URL manipulations.&lt;br /&gt; &lt;br /&gt; Here&amp;#39;s the very basics of regexp (expanded from the Apache &lt;tt&gt;mod_rewrite&lt;/tt&gt; documentation).. &lt;div class=&quot;tiny-space&quot; id=&quot;section-regexp_basics&quot;&gt; &lt;/div&gt; &lt;br /&gt; &lt;blockquote id=&quot;regexp-basics-special-characters&quot;&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-regexp-special-characters&quot;&gt; &lt;pre&gt;&lt;strong&gt;Escaping :&lt;/strong&gt;
&lt;p&gt;&lt;strong&gt;\&lt;/strong&gt;char escape that particular char&lt;/p&gt; &lt;p&gt; For instance to specify special characters.. &lt;strong&gt;[].()\&lt;/strong&gt; etc.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Text :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;.&lt;/strong&gt; Any single character (on its own = the entire URI)
&lt;strong&gt;[&lt;/strong&gt;chars&lt;strong&gt;]&lt;/strong&gt; Character class : One of following chars
&lt;strong&gt;[^&lt;/strong&gt;chars&lt;strong&gt;]&lt;/strong&gt; Character class : None of following chars
text1&lt;strong&gt;|&lt;/strong&gt;text2 Alternative : text1 or text2 (i.e. &quot;or&quot;)&lt;/p&gt; &lt;p&gt; &lt;strong&gt;e.g.&lt;/strong&gt; &lt;strong&gt;[^/]&lt;/strong&gt; matches any character &lt;em&gt;except&lt;/em&gt; &lt;strong&gt;/&lt;/strong&gt; &lt;strong&gt;(foo|bar)\.html&lt;/strong&gt; matches &lt;strong&gt;foo.html&lt;/strong&gt; &lt;em&gt;and&lt;/em&gt; &lt;strong&gt;bar.html&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Quantifiers :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt; ?&lt;/strong&gt; 0 or 1 of the preceding text
&lt;strong&gt;*&lt;/strong&gt; 0 or N of the preceding text (hungry)
&lt;strong&gt;+&lt;/strong&gt; 1 or N of the preceding text&lt;/p&gt; &lt;p&gt; &lt;strong&gt;e.g.&lt;/strong&gt; &lt;strong&gt;(.+)\.html ?&lt;/strong&gt; matches &lt;strong&gt;foo.htm&lt;/strong&gt; &lt;em&gt;and&lt;/em&gt; &lt;strong&gt;foo.html&lt;/strong&gt; &lt;strong&gt;(foo) ?bar\.html&lt;/strong&gt; matches &lt;strong&gt;bar.html&lt;/strong&gt; &lt;em&gt;and&lt;/em&gt; &lt;strong&gt;foobar.html&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Grouping :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;(&lt;/strong&gt;text&lt;strong&gt;)&lt;/strong&gt; Grouping of text&lt;/p&gt; &lt;p&gt; Either to set the borders of an alternative or for making backreferences where the &lt;strong&gt;n&lt;/strong&gt;the group can be used on the target of a RewriteRule with &lt;strong&gt;$n&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;	&lt;strong&gt;e.g. &lt;/strong&gt; ^&lt;strong&gt;(.*)&lt;/strong&gt;\.html foo.php ?bar=&lt;strong&gt;$1&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Anchors :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;^&lt;/strong&gt; Start of line anchor
&lt;strong&gt;$&lt;/strong&gt; End of line anchor&lt;/p&gt; &lt;p&gt; An anchor explicitly states that the character &lt;em&gt;right next to it&lt;/em&gt; MUST be either the very first character (&quot;^&quot;), or the very last character (&quot;$&quot;) of the URI string to match against the pattern, e.g.. &lt;strong&gt;^foo(.*)&lt;/strong&gt; matches &lt;strong&gt;foo&lt;/strong&gt; and &lt;strong&gt;foobar&lt;/strong&gt; but &lt;em&gt;not&lt;/em&gt; &lt;strong&gt;eggfoo&lt;/strong&gt; &lt;strong&gt;(.*)l$&lt;/strong&gt; matches &lt;strong&gt;fool&lt;/strong&gt; and &lt;strong&gt;cool&lt;/strong&gt;, but &lt;em&gt;not&lt;/em&gt; &lt;strong&gt;foo&lt;/strong&gt;&lt;/p&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-short_URLs&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; shortening URLs&lt;/h3&gt;
&lt;div id=&quot;short-urls&quot;&gt; One common use of &lt;tt&gt;mod_rewrite&lt;/tt&gt; is to shorten URL&amp;#39;s. Shorter URL&amp;#39;s are easier to remember and, of course, easier to type. An example..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-short-urls&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; beware the regular expression :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteRule ^grab /public/files/download/download.php&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; this rule would transform this user&amp;#39;s URL..&lt;br /&gt; &lt;br /&gt; &lt;span class=&quot;urltxt&quot;&gt; http://mysite/grab?file=my.zip&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; server-side, into..&lt;br /&gt; &lt;br /&gt; &lt;span class=&quot;urltxt&quot;&gt; http://mysite/public/files/download/download.php?file=my.zip&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; which is a wee trick I use for my distro machine, among other things. everyone likes short URL&amp;#39;s, and so will you ; using this technique, you can move &lt;span class=&quot;urltxt&quot;&gt;/public/files/download/&lt;/span&gt; to &lt;em&gt;anywhere&lt;/em&gt; else in your site, and all the old links still work fine ; simply alter your .htaccess file to reflect the new location. edit one line, done - nice - means even when stuff is way deep in your site you can have cool links like this.. &lt;a title=&quot;just a simple link (opens in a windoid)&quot;&gt;/trueview/sample.php&lt;/a&gt; and &lt;a href=&quot;http://corz.org/bbtags&quot; id=&quot;bbtagslink&quot; title=&quot;the corzblog bbcode parser bbcode guide, way deep in the site&quot;&gt;this&lt;/a&gt; ; links which are not only short, but &lt;em&gt;flat&lt;/em&gt;..&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-capturing_variables&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; capturing variables&lt;/h3&gt;
&lt;div id=&quot;capturing-variables&quot;&gt; Slapping &lt;tt&gt;(.*)&lt;/tt&gt; onto the end of the request part of a &lt;tt&gt;ReWriteRule&lt;/tt&gt; is just fine when using a simple &lt;tt&gt;$_GET&lt;/tt&gt; variable, but sometimes you want to do trickier things, like capturing &lt;em&gt;particular&lt;/em&gt; variables and converting them into &lt;em&gt;other&lt;/em&gt; variables in the target URL. Or something else.. &lt;br /&gt; &lt;br /&gt; When capturing variables, the first thing you need to know about, is the &lt;tt&gt;[QSA]&lt;/tt&gt; flag, which simply tags all the original variables back onto the end of the target url. This may be all you need, and will happen automatically for simple rewrites. The second thing, is &lt;tt&gt;%&lt;i&gt;QUERY_STRING&lt;/i&gt;&lt;/tt&gt;, an Apache server string we can capture variables from, using simple &lt;tt&gt;RewriteCond&lt;/tt&gt; (aka. &lt;em&gt;conditional&lt;/em&gt; ) statements.&lt;br /&gt; &lt;br /&gt; &lt;tt&gt;RewriteCond&lt;/tt&gt; is very like doing &lt;tt&gt;&lt;em&gt;if...then...do&lt;/em&gt;&lt;/tt&gt; in many programming languages. &lt;em&gt;If&lt;/em&gt; a certain condition is true, &lt;em&gt;then&lt;/em&gt; do the rewrite that follows..&lt;br /&gt; &lt;br /&gt; In the following example, the &lt;tt&gt;RewriteCond&lt;/tt&gt; statement checks that the query string has the &lt;tt&gt;foo&lt;/tt&gt; variable set, and captures its value while it&amp;#39;s there. In other words, only requests for &lt;tt&gt;/grab&lt;/tt&gt; that have the variable &lt;tt&gt;foo&lt;/tt&gt; set, will be rewritten, and while we&amp;#39;re at it, we&amp;#39;ll also switch &lt;tt&gt;foo&lt;/tt&gt;, for &lt;tt&gt;bar&lt;/tt&gt;, just because we can..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;simple-capture-variables&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; capturing a $_GET variable :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; foo=(.*)&lt;br /&gt; RewriteRule ^grab(.*) /page.php ?bar=%1&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; would translate a link/user&amp;#39;s request for..&lt;br /&gt; &lt;br /&gt; &lt;tt&gt;&lt;a href='http://domain.com/grab?foo=bar' class='spip_out' rel='nofollow external'&gt;http://domain.com/grab?foo=bar&lt;/a&gt;&lt;/tt&gt;&lt;br /&gt; &lt;br /&gt; server-side, into..&lt;br /&gt; &lt;br /&gt; &lt;tt&gt;&lt;a href='http://domain.com/page.php?bar=bar' class='spip_out' rel='nofollow external'&gt;http://domain.com/page.php?bar=bar&lt;/a&gt;&lt;/tt&gt;&lt;br /&gt; &lt;br /&gt; Which is to say, the user&amp;#39;s browser would be fed &lt;tt&gt;page.php&lt;/tt&gt; (without an &lt;tt&gt;[R]&lt;/tt&gt; flag in the &lt;tt&gt;RewriteRule&lt;/tt&gt;, their address bar would still read &lt;tt&gt;/grab ?foo=bar&lt;/tt&gt;). The variable &lt;tt&gt;bar&lt;/tt&gt; would be available to your script, with its value set to &lt;tt&gt;bar&lt;/tt&gt;. This variable has been magically created, by simply using a regular &lt;tt&gt;&lt;strong&gt; ?&lt;/strong&gt;&lt;/tt&gt; in the target of the &lt;tt&gt;RewriteRule&lt;/tt&gt;, and tagging on the first captured backreference, &lt;strong&gt;%1&lt;/strong&gt;.. &lt;tt&gt; ?bar=%1&lt;/tt&gt;&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Note&lt;/strong&gt; how we use the &lt;code class='spip_code' dir='ltr'&gt;&lt;strong&gt;%&lt;/strong&gt;&lt;/code&gt; character, to specify variables captured in &lt;tt&gt;RewriteCond&lt;/tt&gt; statements, aka &quot;Backreferences&quot;. This is exactly like using &lt;strong&gt;$1&lt;/strong&gt; to specify numbered backreferences captured in &lt;tt&gt;RewriteRule&lt;/tt&gt; patterns, except for strings captured inside a &lt;tt&gt;RewriteCond&lt;/tt&gt; statement, we use &lt;code class='spip_code' dir='ltr'&gt;&lt;strong&gt;%&lt;/strong&gt;&lt;/code&gt; instead of &lt;strong&gt;$&lt;/strong&gt;. Simple.&lt;br /&gt; &lt;br /&gt; You can use the &lt;tt&gt;[QSA]&lt;/tt&gt; flag in &lt;em&gt;addition&lt;/em&gt; to these query string manipulations, merge them. In the next example, the value of &lt;tt&gt;foo&lt;/tt&gt; becomes the &lt;em&gt;directory&lt;/em&gt; in the target URL, and the variable &lt;tt&gt;file&lt;/tt&gt; is magically created. The original query string is then tagged back onto the end of the whole thing..&lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;more-complex-variable-capture&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; QSA Overkill !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; foo=(.+)&lt;br /&gt; RewriteRule ^grab/(.*) /%1/index.php ?file=$1 [QSA]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; So a request for..&lt;br /&gt; &lt;br /&gt; &lt;tt&gt;&lt;a href='http://domain.com/grab/foobar.zip?level=5&amp;foo=bar' class='spip_out' rel='nofollow external'&gt;http://domain.com/grab/foobar.zip?l...&lt;/a&gt;&lt;/tt&gt;&lt;br /&gt; &lt;br /&gt; is translated, server-side, into..&lt;br /&gt; &lt;br /&gt; &lt;tt&gt;&lt;a href='http://domain.com/bar/index.php?file=foobar.zip&amp;level=5&amp;foo=bar' class='spip_out' rel='nofollow external'&gt;http://domain.com/bar/index.php?fil...&lt;/a&gt;&lt;/tt&gt;&lt;br /&gt; &lt;br /&gt; Depending on your needs, you could even use flat links &lt;em&gt;and&lt;/em&gt; dynamic variables together, something like this could be useful..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;variable-capture-mix-flat-and-dynamic-links&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; mixing flat and dynamic links in a single ruleset..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; version=(.+)&lt;br /&gt; RewriteRule ^grab/([^/]+)/(.*) /%1/index.php ?section=$1&amp;file=$2 [QSA]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; By the way, you can easily do the &lt;em&gt;opposite&lt;/em&gt;, strip a query string from a URL, by simply putting a &lt;tt&gt;&lt;strong&gt; ?&lt;/strong&gt;&lt;/tt&gt; right at the end of the target part. This example does exactly that, whilst leaving the actual URI intact..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;strip-variables&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; just a demo !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; . &lt;br /&gt; RewriteRule foo.php(.*) /foo.php&lt;strong&gt; ?&lt;/strong&gt; [L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; The &lt;tt&gt;RewriteCond&lt;/tt&gt; statement only allows requests that have &lt;em&gt;something&lt;/em&gt; in their query string, to be processed by the &lt;tt&gt;RewriteRule&lt;/tt&gt;, or else we&amp;#39;d end up in that hellish place, dread to all mod_rewriters.. the endless loop. &lt;tt&gt;RewriteCond&lt;/tt&gt; is often used like this ; as a safety-net.&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-cooler_access_denied&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; cooler access denied&lt;/h3&gt;
&lt;div id=&quot;cooler-access-denied&quot;&gt; In &lt;a href=&quot;http://corz.org/serv/tricks/htaccess.php#denied&quot; title=&quot;... .htaccess tricks: authentication, indexing, and more&quot;&gt;part one&lt;/a&gt; I demonstrated a drop-dead simple mechanism for denying access to particular files and folders. The trouble with this is the way our user gets a 403 &quot;Access Denied&quot; error, which is a bit like having a door slammed in your face. Fortunately, &lt;tt&gt;mod_rewrite&lt;/tt&gt; comes to the rescue again and enables us to do less painful things. One method I often employ is to redirect the user to the parent folder..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-cool-access-denied&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; they go &quot;huh ?.. ahhh !&quot;&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# send them up !&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.*)$ ../ [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; It works great, though it can be a wee bit tricky with the URLs, and you may prefer to use a harder location, which avoids potential issues in indexed directories, where folks can get in a loop.. &lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-cooler-access-denied&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; they go damn ! Oh !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# send them exactly there !&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.*)$ /comms/hardware/router/ [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Sometimes you&amp;#39;ll only want to deny access to &lt;em&gt;most&lt;/em&gt; of the files in the directory, but allow access to maybe one or two files, or file types, easy..&lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-deny-with-style&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; deny with style !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# users can load only &quot;special.zip&quot;, and the css and js files.&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_FILENAME&lt;/i&gt; !^(.+)\.css$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_FILENAME&lt;/i&gt; !^(.+)\.js$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_FILENAME&lt;/i&gt; !special.zip$&lt;br /&gt; RewriteRule ^(.+)$ /chat/ [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Here we take the whole thing a stage further. Users can access .css (stylesheet) and Javascript files without problem, and also the file called &quot;special.zip&quot;, but requests for any other file types are immediately redirected back up to the main &quot;/chat/&quot; directory. You can add as many types as you need. You could also bundle the filetypes into one line using | (or) syntax, though individual lines are perhaps clearer.&lt;br /&gt; &lt;br /&gt; Here&amp;#39;s what&amp;#39;s currently cooking inside my &lt;tt&gt;/inc/&lt;/tt&gt; directory..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-control-inc&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; all-in-one control..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteEngine on&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# allow access with no restrictions to local machine at 192.168.1.3&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;REMOTE_ADDR&lt;/i&gt; !192.168.1.3&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# allow access to all .css and .js in sub-directories..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !\.css$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !\.js$&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# allow access to the files inside img/, but not a directory listing..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !img/(.*)\.&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# allow access to these particular files...&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !comments.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !corzmail.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !digitrack.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !gd-verify.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !post-dumper.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !print.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !source-dump.php$&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !textview.php$&lt;br /&gt; RewriteRule ^(.*)$ / [R,NC,L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-more_banning&quot;&gt; &lt;/div&gt;
&lt;div id=&quot;more-better-banning&quot;&gt; &lt;h3&gt; Ban User Agents, referrers, script-kiddies and more..&lt;/h3&gt; There are many valid reasons to ban a particular request from sucking up your site&amp;#39;s resources ; resources that could be better served to valid, interested users. It might be some cross-site attack script, or inward link from a place you don&amp;#39;t want to be associated with, or perhaps a web sucker or download manager, whatever ; .htaccess + &lt;tt&gt;mod_rewrite&lt;/tt&gt; provides ways to protect your content from unwanted &quot;guests&quot;.&lt;br /&gt; &lt;br /&gt; The basic formula is standard if-then logic : &lt;em&gt;if&lt;/em&gt; the request meets a particular CONDITION, &lt;em&gt;then&lt;/em&gt; REWRITE the request. The &quot;conditions&quot; can be many things ; perhaps the referrer header sent by their browser (the site they came &lt;em&gt;from&lt;/em&gt;), or the page they asked for, or a particular query parameter, or the type of client (browser, etc.) they are using, or any other piece of information Apache has attached to the request. Here&amp;#39;s an example which will deny access to &quot;Teleport Pro&quot;, a download manager which is known to suck, hard..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-this-sucker-to-my-abuse-page&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; Who need&amp;#39;s a local copy, when I&amp;#39;m right here ?..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^Teleport\ Pro [NC]&lt;br /&gt; RewriteRule . abuse.txt [L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; It&amp;#39;s your site, and just like your home, you have every right to exert some control over who gets in. You may have a &lt;em&gt;huge&lt;/em&gt; list of user agents you&amp;#39;d rather not have eating your bandwidth ; so use the &lt;tt&gt;[OR]&lt;/tt&gt; flag, and &lt;em&gt;line &amp;#39;em up..&lt;/em&gt;&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-suckers-to-my-abuse-page&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; A little garlic for the net vampires..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^BackWeb [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^Bandit [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^BatchFTP [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^BecomeBot [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^BlackWidow [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# etc..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; ^Net\ Vampire [NC]&lt;br /&gt; RewriteRule . abuse.txt [L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; This forms the basis of what often becomes a HUGE list of ban-lines. Remember, we aren&amp;#39;t limited to user agent strings..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-anyone-to-my-abuse-page&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; Suckers, h4x0rz, kiddies, cross-site scripters and more.. Bye now !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# why not come visit me directly ?&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_REFERER&lt;/i&gt; \.opendirviewer\. [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# this prevents stoopid cross-site discovery attacks..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;THE_REQUEST&lt;/i&gt; \ ?\ HTTP/ [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# please stop pretending to be the Googlebot..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_REFERER&lt;/i&gt; users\.skynet\.be.* [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# really, we need a special page for these twats..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; \=\|w\| [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;THE_REQUEST&lt;/i&gt; etc/passwd [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; owssvr\.dll [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# you can probably work these out..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;QUERY_STRING&lt;/i&gt; \=\|w\| [NC,OR]&lt;br /&gt; RewriteCond %&lt;i&gt;THE_REQUEST&lt;/i&gt; \/\*\ HTTP/ [NC,OR]&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# etc..&lt;/span&gt;&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_USER_AGENT&lt;/i&gt; Sucker [NC]&lt;br /&gt; RewriteRule . abuse.txt [L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Fortunately, &lt;tt&gt;mod_rewrite&lt;/tt&gt; can parse enormous lists of ban-lines in milliseconds, so feel free to be as specific and comprehensive as required.&lt;br /&gt; &lt;br /&gt; As ever, &lt;strong&gt;thorough testing is strongly recommended&lt;/strong&gt;. Simply send requests matching your conditions and see what happens. And importantly ; normal requests, too. Firefox, Opera, Konqueror, and most other decent browsers, allow you to alter the user agent string ; though you would quickly find the process tedious in a testing situation. Far better to use some tool better designed to send fake HTTP requests..&lt;br /&gt; &lt;br /&gt; It&amp;#39;s not too difficult to mock up a web request on the command-line with any-old user agent using a scripting language like php or Perl, if you have these things available (read : most Linux/UNIX/BSD/etc. as well as many other &lt;a title=&quot;Operating Systems&quot;&gt;OS&lt;/a&gt;). Many examples exist online. In fact, you could quickly create a &lt;em&gt;suite&lt;/em&gt; of tests, designed to interrogate all your rewrite rules, with results logging and much more, if required. &lt;a href=&quot;http://curl.haxx.se/&quot; id=&quot;link-external-cURL&quot; title=&quot;groks those URLs, apparently.&quot;&gt;cURL&lt;/a&gt; is always useful for jobs like this, so long as you don&amp;#39;t add a cURL ban-line !&lt;br /&gt; &lt;br /&gt; On a Windows desktop, &lt;a href=&quot;http://preview.samspade.org/ssw/&quot; id=&quot;link-external-Sam_Spade_Software&quot; title=&quot;DO NOT DISABLE THE STARTUP QUOTES! That's my advice.&quot;&gt;Sam Spade&lt;/a&gt; can send a single spoofed request with a couple of clicks, along with a stack of similarly handy tricks, and regularly proves itself invaluable.&lt;br /&gt; &lt;div class=&quot;small-space&quot;&gt; &lt;/div&gt; &lt;h5&gt; Don&amp;#39;t let just &lt;em&gt;anyone&lt;/em&gt; hammer your site !&lt;/h5&gt; While I&amp;#39;m on the subject of abusive web clients, you will probably have noticed that many clients (bots, spiders, automated suckers and such) like to disguise their user agent information, in fact &lt;em&gt;any&lt;/em&gt; information, in an attempt to bring your site to its knees, hammering your pages so-many times per second in the process. Oh dear.&lt;br /&gt; &lt;br /&gt; If you are interested in a way to defeat hammering web clients, regardless of who they &lt;em&gt;pretend&lt;/em&gt; to be, or whether or not they accept cookies or any such malarkey, check out &lt;a href=&quot;http://corz.org/serv/tools/anti-hammer/&quot; id=&quot;link-server-tools_anti-hammer&quot; title=&quot;Automatically ban web site hammers! Protect your valuable server resources for genuine clients.&quot;&gt;Anti-Hammer&lt;/a&gt;. It&amp;#39;s free.&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-prevent_hot-linking&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; prevent hot-linking&lt;/h3&gt;
&lt;div id=&quot;h0t71nKiN4_FuCkP1g5&quot;&gt; Believe it or not, there are some webmasters who, rather than coming up with their own content will &lt;em&gt;steal&lt;/em&gt; yours. Really ! Even worse, they won&amp;#39;t even bother to copy to their own server to serve it up, they&amp;#39;ll just &lt;strong&gt;link to your content !&lt;/strong&gt; no, it&amp;#39;s true, in fact, it used to be incredibly common. These days most people like to prevent this sort of thing, and .htaccess is one of the best ways to do it.&lt;br /&gt; &lt;br /&gt; This is one of those directives where the mileage variables are at their limits, but something like this works fine for me..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-prevent-hot-linking&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; how DARE they !&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# no hot-linking&lt;/span&gt;&lt;br /&gt; RewriteEngine On&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_REFERER&lt;/i&gt; !^$&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_REFERER&lt;/i&gt; !^http://(www\.) ?corz\.org/ [NC]&lt;br /&gt; RewriteCond %&lt;i&gt;REQUEST_URI&lt;/i&gt; !hotlink\.(gif|png) [NC]&lt;br /&gt; RewriteRule .*\.(gif|jpg|png)$ &lt;a title=&quot;this is what you get hot-linking to corz.org!&quot;&gt;http://corz.org/img/hotlink.png&lt;/a&gt; [NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; You may see the last line broken into two, but it&amp;#39;s all one line (all the directives on this page are). Let&amp;#39;s have a wee look at what it does..&lt;br /&gt; &lt;br /&gt; We begin by enabling the rewrite engine, as always. &lt;br /&gt; &lt;br /&gt; The first &lt;a title=&quot;'conditions', things to and match against the rewrite rule with deal with whatever requests these 'conditions' match&quot;&gt;RewriteCond&lt;/a&gt; line allows &lt;em&gt;direct&lt;/em&gt; requests (not &lt;em&gt;from&lt;/em&gt; other pages - an &quot;empty referrer&quot;) to pass unmolested. The next line means ; &lt;em&gt;if&lt;/em&gt; the browser &lt;em&gt;did&lt;/em&gt; send a referrer header, and the word &quot;corz.org&quot; is &lt;em&gt;not in the domain part of it&lt;/em&gt;, then &lt;em&gt;DO&lt;/em&gt; rewrite this request.&lt;br /&gt; &lt;br /&gt; The all-important final &lt;a title=&quot;the magic happens here. only requests that got through all the condition statements will be processed by the rule on this line.&quot;&gt;RewriteRule&lt;/a&gt; line instructs &lt;tt&gt;mod_rewrite&lt;/tt&gt; to rewrite all matched requests (anything without &quot;corz.org&quot; in its referrer) asking for gifs, jpegs, or pngs, to an alternative image. &lt;br /&gt; &lt;br /&gt; There are loads of ways you can write this rule ; Google for &quot;hot-link protection&quot; and get a whole heap. Simple is best. You could send a wee message instead, or direct them to some evil script, or something. Mine is a simple &lt;tt&gt;corz.org&lt;/tt&gt; logo, which &lt;em&gt;I&lt;/em&gt; think is rather clever. Actually, these days, I do something even &lt;a href=&quot;http://corz.org/devblog/2008-dec/Auto-HotLink&quot; id=&quot;link-devblog-auto-hotlink&quot; title=&quot;It's Automatic! It's HYDROMATIC! No wait, it's not hydromatic..&quot;&gt;cleverer-er&lt;/a&gt;..&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-lose_the_www&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; lose the &quot;www&quot;&lt;/h3&gt;
&lt;div id=&quot;NOWWW&quot;&gt; I&amp;#39;m often asked how I prevent the &quot;www&quot; part showing up at my site, so I guess I should add something about that. Briefly, if someone types &lt;a href='http://www.corz.org/' class='spip_out' rel='nofollow external'&gt;http://www.corz.org/&lt;/a&gt; into their browser (or uses the www part for any link at corz.org) it is redirected to the plain, rather neat, &lt;a href='http://corz.org/' class='spip_out' rel='nofollow external'&gt;http://corz.org/&lt;/a&gt; version. This is &lt;em&gt;very&lt;/em&gt; easy to achieve, like this..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-no-www&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; beware the regular expression :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteCond %&lt;i&gt;http_host&lt;/i&gt; ^www\.corz\.org [NC]&lt;br /&gt; RewriteRule ^(.*)$ &lt;a href='http://corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://corz.org/$1&lt;/a&gt; [R=301,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; You don&amp;#39;t need to be touched by genius to see what&amp;#39;s going on here. There are other ways you could write this rule, but again, simple is best. Like most of the examples here, the above is pasted directly from my own main .htaccess file, so you can be sure it works perfectly. In fact, I recently updated it so that I could share rules between my dev mirror and live site without any .htaccess editing..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-no-www-better&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; here&amp;#39;s what I&amp;#39;m currently using :&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_HOST&lt;/i&gt; ^www\.(.*) [NC]&lt;br /&gt; RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-rewrite_sub-domains&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; multiple domains in one root&lt;/h3&gt;
&lt;div id=&quot;mod_rewrite-domains&quot;&gt; If you are in the unfortunate position of having your sites living on a host that doesn&amp;#39;t support multiple domains, you may be forced to roll your own with &lt;tt&gt;.htaccess&lt;/tt&gt; and &lt;tt&gt;mod_rewrite&lt;/tt&gt;. So long as your physical directory structure is well thought-out, this is fairly simple to achieve.&lt;br /&gt; &lt;br /&gt; For example, let&amp;#39;s say we have two domains, pointing at a single hosted root ; &lt;tt&gt;domain-one.com&lt;/tt&gt; and &lt;tt&gt;domain-two.com&lt;/tt&gt;. In our web server root, we simply create a folder for each domain, perhaps &lt;tt&gt;one/&lt;/tt&gt;, and &lt;tt&gt;two/&lt;/tt&gt; then in our main (root) &lt;tt&gt;.htaccess&lt;/tt&gt;, rewrite all incoming requests, like this..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; All requests NOT already rewritten into these folders, transparently rewrite..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;&lt;span class=&quot;code-comment&quot;&gt;#two domains served from one root..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; RewriteCond %{HTTP_HOST} domain-one.com&lt;br /&gt;&lt;br /&gt; RewriteCond %{REQUEST_URI} !^/one&lt;br /&gt;&lt;br /&gt; RewriteRule ^(.*)$ one/$1 [L]&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; RewriteCond %{HTTP_HOST} domain-two.com&lt;br /&gt;&lt;br /&gt; RewriteCond %{REQUEST_URI} !^two&lt;br /&gt;&lt;br /&gt; RewriteRule ^(.*)$ two/$1 [L]&lt;br /&gt;&lt;br /&gt; &lt;/code&gt;&lt;/div&gt;
&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; All requests for the host &lt;tt&gt;domain-one.com&lt;/tt&gt; are rewritten (not R=redirected) to the &lt;tt&gt;one/&lt;/tt&gt; directory, so long as they haven&amp;#39;t already been rewritten there (the second &lt;tt&gt;RewriteCond&lt;/tt&gt;). Same story for &lt;tt&gt;domain-two.com&lt;/tt&gt;. Note the inconsistency in the RewriteCond statement ; &lt;tt&gt; !^/dir-name&lt;/tt&gt; and &lt;tt&gt; !^dir-name&lt;/tt&gt; should both work fine.&lt;br /&gt; &lt;br /&gt; Also note, with such a simple domain &amp; folder naming scheme, you could easily merge these two rule sets together. This would be unlikely in the real world though, which is why I left them separate ; but still, worth noting.&lt;br /&gt; &lt;br /&gt; Other general settings and php directives can also go in this root &lt;tt&gt;.htaccess&lt;/tt&gt; file, though if you have any further rewrite you&amp;#39;d like to perform ; short URL&amp;#39;s, htm to php conversion and what-not ; it&amp;#39;s probably easier and clearer to do those inside the sub-directory&amp;#39;s .htaccess files.&lt;/div&gt;
&lt;div class=&quot;tiny-space&quot; id=&quot;section-auto-translation&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; automatic translation&lt;/h3&gt;
&lt;div id=&quot;auto-translate&quot;&gt; If you don&amp;#39;t read English, or some of your guests don&amp;#39;t, here&amp;#39;s a neat way to have the wonderful Google translator provide automatic on-the-fly translation for your site&amp;#39;s pages. Something like this..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-auto-translation-ORIGINAL&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; they simply add their country code to the end of the link, or &lt;em&gt;you&lt;/em&gt; do..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.*)-fr$ &lt;a href='http://www.google.com/translate_c?hl=fr&amp;sl=en&amp;u=http:/corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://www.google.com/translate_c?h...&lt;/a&gt; [R,NC]&lt;br /&gt; RewriteRule ^(.*)-de$ &lt;a href='http://www.google.com/translate_c?hl=de&amp;sl=en&amp;u=http:/corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://www.google.com/translate_c?h...&lt;/a&gt; [R,NC]&lt;br /&gt; RewriteRule ^(.*)-es$ &lt;a href='http://www.google.com/translate_c?hl=es&amp;sl=en&amp;u=http:/corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://www.google.com/translate_c?h...&lt;/a&gt; [R,NC]&lt;br /&gt; RewriteRule ^(.*)-it$ &lt;a href='http://www.google.com/translate_c?hl=it&amp;sl=en&amp;u=http:/corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://www.google.com/translate_c?h...&lt;/a&gt; [R,NC]&lt;br /&gt; RewriteRule ^(.*)-pt$ &lt;a href='http://www.google.com/translate_c?hl=pt&amp;sl=en&amp;u=http:/corz.org/$1' class='spip_out' rel='nofollow external'&gt;http://www.google.com/translate_c?h...&lt;/a&gt; [R,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; You can create your menu with its flags or whatever you like, and add the country code to end of the links.. &lt;tt&gt;&lt;a href=&quot;page.html-fr&quot; id=&quot;... &lt;/tt&gt; &lt;a href=&quot;http://corz.org/serv/tricks/htaccess2.php-fr&quot; id=&quot;french-version&quot; rel=&quot;nofollow&quot; title=&quot;Automatic Translation courtesy of the ever-wonderful Google&quot;&gt;Want to see this page in French&lt;/a&gt; ?&lt;br /&gt; &lt;br /&gt; Although it is very handy, and I&amp;#39;ve been using it here for a couple of years here at the org, for my international blog readers, all two of them, heh. Almost no one knows about it, mainly because I don&amp;#39;t have any &lt;em&gt;links&lt;/em&gt; . One day I&amp;#39;ll probably do a wee toolbar with flags and what-not. Perhaps not. Trouble is, the Google translator stops translating after a certain amount of characters (which seems to be increasing, good), though these same rules could easily be applied to other translators, and if you find a good one, one that will translate a really &lt;em&gt;huge&lt;/em&gt; document on-the-fly, do let me know !&lt;br /&gt; &lt;br /&gt; If you wanted to be really clever, you could even perform some some kind of IP block check and present the correct version automatically, but that is outside the scope of this document. note : this may be undesirable for pages where technical commands are given (like this page) because the commands will also be translated. &quot;RewriteEngine dessus&quot; will almost certainly get you a 500 error page !&lt;br /&gt; &lt;br /&gt; Another thing you might like to try ; rather than individual country flags ; fr, de, etc., use the &quot;u&quot; flag, for &quot;Universal&quot;. In theory, Google will check the client&amp;#39;s location, and automatically translate to &lt;em&gt;that&lt;/em&gt; language. One line in your .htaccess would cover all languages, and automatically cover new ones as Google adds them.&lt;br /&gt; &lt;br /&gt; While I&amp;#39;m here, slightly related ; if you are non-Englishman speaking, note, you can do a similar thing browser-side, create a &quot;bookmarklet&quot; (a regular bookmark, except that it &quot;does something&quot;), using this code for the location.. &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-auto-translation-from-browser&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; the same sort of thing, except browser-side..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; javascript:void(location.href=&amp;#39;&lt;a href='http://translate.google.com/translate?u=&amp;#39;+location.href' class='spip_out' rel='nofollow external'&gt;http://translate.google.com/transla...&lt;/a&gt;)&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;small-space&quot;&gt; &lt;/div&gt;
&lt;h3&gt; httpd.conf&lt;/h3&gt;
&lt;div id=&quot;subfolderrulesok&quot;&gt; Remember, if you put these rules in the main server conf file (usually httpd.conf) rather than an .htaccess file, you&amp;#39;ll need to use &lt;strong&gt;^/...&lt;/strong&gt; ... instead of &lt;strong&gt;^...&lt;/strong&gt; ... at the beginning of the RewriteRule line, in other words, add a slash.&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-inheritance&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; inheritance..&lt;/h3&gt;
&lt;div id=&quot;inheritance&quot;&gt; If you are creating rules in sub-folders of your site, you need to read this.&lt;br /&gt; &lt;br /&gt; You&amp;#39;ll remember how rules in top folders apply to all the folders &lt;em&gt;inside&lt;/em&gt; those folders too. we call this &quot;inheritance&quot;. normally this just works. &lt;strong&gt;but&lt;/strong&gt; if you start creating other rules inside subfolders you will, in effect, obliterate the rules already applying to that folder due to inheritance, or &quot;decendancy&quot;, if you prefer. not &lt;em&gt;all&lt;/em&gt; the rules, &lt;em&gt;just the ones applying to that subfolder&lt;/em&gt;. a wee demonstration..&lt;br /&gt; &lt;br /&gt; Let&amp;#39;s say I have a rule in my main &lt;code class='spip_code' dir='ltr'&gt;/.htaccess&lt;/code&gt; which redirected requests for files ending .htm to their .php equivalent, just like the example at the top of this very page. now, if for any reason I need to add some rewrite rules to my &lt;code class='spip_code' dir='ltr'&gt;/osx/.htaccess&lt;/code&gt; file, the .htm &gt;&gt; .php redirection will no longer work for the &lt;code class='spip_code' dir='ltr'&gt;/osx/&lt;/code&gt; subfolder, I&amp;#39;ll need to reinsert it, &lt;em&gt;but with a &lt;span style=&quot;color:#F81D00&quot;&gt;crucial&lt;/span&gt; difference&lt;/em&gt;..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-inheritance-cascading&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; this works fine, site-wide, in my main .htaccess file&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# main (top-level) .htaccess file..&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# requests to file.htm goto file.php&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule ^(.*)\.htm$ &lt;a href='http://corz.org/$1.php' class='spip_out' rel='nofollow external'&gt;http://corz.org/$1.php&lt;/a&gt; [R=301,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Here&amp;#39;s my updated &lt;code class='spip_code' dir='ltr'&gt;/osx/.htaccess&lt;/code&gt; file, with the .htm &gt;&gt; .php redirection rule reinserted..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-subfolder-rules&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; but I&amp;#39;ll need to reinsert the rules for it to work in this sub-folder&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# /osx/.htaccess file..&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteRule some rule that I need here&lt;br /&gt; RewriteRule some other rule I need here&lt;br /&gt; RewriteRule ^(.*)\.htm$ &lt;a href='http://corz.org/' class='spip_out' rel='nofollow external'&gt;http://corz.org/&lt;/a&gt;&lt;span style=&quot;color:#F81D00&quot;&gt;osx/&lt;/span&gt;$1.php [R=301,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Spot the difference in the subfolder rule, highlighted in &lt;span style=&quot;color:#F81D00&quot;&gt;red&lt;/span&gt;. you &lt;strong&gt;must&lt;/strong&gt; add the current path to the new rule. now it works again, and all the osx/ subfolders will be covered by the new rule. if you remember this, you can go replicating rewrite rules all over the place.&lt;br /&gt; &lt;br /&gt; If it&amp;#39;s possible to put your entire site&amp;#39;s rewrite rules into the main .htaccess file, and it probably is ; do that, instead, like this.. &lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-all-in-one&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; it&amp;#39;s a good idea to put all your rules in your main .htaccess file..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;# root /.htaccess file..&lt;/span&gt;&lt;br /&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# .htm &gt;&gt; .php is now be covered by our main rule, there&amp;#39;s no need to repeat it. &lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# But if we do need some /osx/-specific rule, we can do something like this..&lt;/span&gt;&lt;br /&gt; RewriteRule ^&lt;span style=&quot;color:#F81D00&quot;&gt;osx/&lt;/span&gt;(.*)\.foo$ &lt;a title=&quot;normally, there's no need to specify the full URL.&quot;&gt;/&lt;/a&gt;&lt;span style=&quot;color:#F81D00&quot;&gt;osx/&lt;/span&gt;$1.bar [R=301,NC]&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; Note, no full URL (with domain) in the second example. Don&amp;#39;t let this throw you ; with or without is functionally identical, on &lt;em&gt;most&lt;/em&gt; servers. Essentially, try it without the full URL first, and if that doesn&amp;#39;t work, sigh, and add it - maybe on your next host !&lt;br /&gt; &lt;br /&gt; The latter, simpler form is preferable, if only for its tremendous portability it offers - my live site, and my development mirror share the exact same .htaccess files - a highly desirable thing.&lt;br /&gt; &lt;br /&gt; By the way, it perhaps doesn&amp;#39;t go without saying that if you want to &lt;em&gt;disable&lt;/em&gt; rewriting inside a particular subfolder, where it is &lt;em&gt;enabled&lt;/em&gt; further up the tree, simply do :&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-disable-rewriting-in-here&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; handy for avatar folders, to allow hot-linking, etc..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteEngine &lt;a id=&quot;mod_rewrite_OFF&quot; title=&quot;using 'on', would also work, but with a slight performance penalty. Also, it's silly.&quot;&gt;off&lt;/a&gt;&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-cookies&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; cookies&lt;/h3&gt;
&lt;div id=&quot;cookies-in-htaccess&quot;&gt; Lastly, a quick word about cookies. While it&amp;#39;s easy enough to set cookies in .htaccess without any &lt;tt&gt;mod_rewrite&lt;/tt&gt;..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; create a cookie called &quot;example-cookie&quot;, and set its value to &quot;true&quot;..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Header set Set-Cookie &quot;example-cookie=true&quot;&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; ..you &lt;em&gt;will&lt;/em&gt; need it to read the cookie information back again, and &quot;do stuff&quot; with it. It&amp;#39;s easy. For example, to check if the above cookie exists and has the correct value set, we could simply do..&lt;br /&gt; &lt;br /&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; check for that same cookie + value..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; Options +FollowSymlinks&lt;br /&gt; RewriteEngine on&lt;br /&gt; RewriteCond %&lt;i&gt;HTTP_COOKIE&lt;/i&gt; !example-cookie=true&lt;br /&gt; RewriteRule .* /err/401.php&lt;/div&gt; &lt;/div&gt; &lt;/blockquote&gt; &lt;br /&gt; ..which could easily form the basis of a simple authentication system. As with any RewriteCond, you can get pretty complex, checking multiple cookies, utilizing regexp and more, but that&amp;#39;s enough to get you started.&lt;/div&gt;
&lt;div class=&quot;small-space&quot; id=&quot;section-conclusion&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; conclusion&lt;/h3&gt;
&lt;div id=&quot;summinup&quot;&gt; In short, &lt;tt&gt;mod_rewrite&lt;/tt&gt; enables you to send browsers &lt;em&gt;from&lt;/em&gt; anywhere &lt;em&gt;to anywhere&lt;/em&gt;. You can create rules based not simply on the requested URL, but also on such things as IP address, browser agent (send old browsers to different pages, for instance), and even the time of day ; the possibilities are practically limitless.&lt;br /&gt; &lt;br /&gt; The ins-and outs of &lt;tt&gt;mod_rewrite&lt;/tt&gt; syntax are topic for a &lt;em&gt;much&lt;/em&gt; longer document than this, and if you fancy experimenting with more advanced rewriting rules, I urge you to check out the Apache documentation. &lt;br /&gt; &lt;br /&gt; If you have Apache installed on your system, there will likely be a copy of the Apache manual, &lt;a href=&quot;http://localhost/manual/&quot; title=&quot;oh what a clever puter you've got! (opens in a new window - apple-click (shift-click on peecees) for a new tab instead)&quot;&gt;right here&lt;/a&gt;, and the excellent mod_rewriting guide, &lt;a href=&quot;http://localhost/manual/misc/rewriteguide.html&quot; title=&quot;aye, there's loads of stuff like this hidden in yer puter! (opens in a new window - apple-click (shift-click on peecees) for a new tab instead)&quot;&gt;lives right here&lt;/a&gt;. do check out the &lt;a href=&quot;http://localhost/manual/mod/mod_rewrite.html&quot; title=&quot;the syntax stuff lives here (opens in a new window - apple/shift-click for a new tab/window)&quot;&gt;URL Rewriting Engine notes&lt;/a&gt; for the juicy syntax bits. That&amp;#39;s where I got the cute quote for the top of the page, too.&lt;/div&gt;
&lt;div class=&quot;small-space&quot;&gt; &lt;/div&gt;
&lt;div id=&quot;ceeya&quot;&gt; ;o) &lt;a href=&quot;mailto:questions@corz.org?subject=htaccess2.php&quot;&gt;Cor&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;quarter-space&quot;&gt; &lt;/div&gt;
&lt;div class=&quot;tiny-space&quot; id=&quot;section-troubleshooting&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h3&gt; troubleshooting tips..&lt;/h3&gt;
&lt;h4&gt; Fatal Redirection&lt;/h4&gt;
&lt;p&gt;	If you start messing around with 301 redirects [R=301], aka. &quot;Permanently Redirected&quot;, and your rule isn&amp;#39;t working, you could give yourself some serious headaches..&lt;br /&gt; &lt;br /&gt; Once the browser has been redirected &lt;em&gt;permanently&lt;/em&gt; to the wrong address, if you then go on to alter the wonky rule, your browser will &lt;em&gt;still&lt;/em&gt; be redirected to the old address (because it&amp;#39;s a browser thing), and you may even go on to fix, &lt;em&gt;and then break&lt;/em&gt; the rule all over again without ever knowing it. Changes to 301 redirects can take a long time to show up in your browser.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Solution&lt;/strong&gt; : restart your browser, or use a different one.&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Better Solution&lt;/strong&gt; : Use [R] instead of [R=301] &lt;em&gt;while you are testing&lt;/em&gt; . When you are 100% certain the rule does exactly as it&amp;#39;s expected to, &lt;em&gt;then&lt;/em&gt; switch it to [R=301] for your live site.&lt;/p&gt; &lt;div class=&quot;tiny-space&quot;&gt; &lt;/div&gt;
&lt;h4&gt; rewrite logging..&lt;/h4&gt;
&lt;p&gt;	When things aren&amp;#39;t working, you may want to enable rewrite logging. I&amp;#39;ll assume you are testing these &lt;tt&gt;mod_rewrite&lt;/tt&gt; directives on your development mirror, or similar setup, and can access the main &lt;tt&gt;httpd.conf&lt;/tt&gt; file. If not, &lt;em&gt;why not ?&lt;/em&gt; Testing &lt;tt&gt;mod_rewrite&lt;/tt&gt; rules on your live domain isn&amp;#39;t exactly ideal, is it ? Anyway, put this somewhere at the foot of your &lt;tt&gt;http.conf&lt;/tt&gt;..&lt;/p&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;rewrite-rule-logging&quot;&gt; &lt;div class=&quot;codetop&quot;&gt; Expect large log files..&lt;/div&gt; &lt;div class=&quot;codeblock&quot;&gt; &lt;span class=&quot;code-comment&quot;&gt;#&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;# ONLY FOR TESTING REWRITE RULES !!!!!&lt;/span&gt;&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;#&lt;/span&gt;&lt;br /&gt; RewriteLog &quot;/tmp/rewrite.log&quot;&lt;br /&gt; &lt;span class=&quot;code-comment&quot;&gt;#RewriteLogLevel 9&lt;/span&gt;&lt;br /&gt; RewriteLogLevel 5&lt;/div&gt; &lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;	&lt;br /&gt; Set the file location and logging level to suit your own requirements. If your rule is causing your Apache to loop, load the page, immediately hit your browser&amp;#39;s &quot;STOP&quot; button, and then restart Apache. All within a couple of seconds. Your rewrite log will be full of all your diagnostic information, and your server will carry on as before.&lt;br /&gt; &lt;br /&gt; Setting a value of 1 gets you almost no information, setting the log level to 9 gets you GIGABYTES ! So you &lt;strong&gt;must&lt;/strong&gt; remember to comment out these rules and restart Apache when you are finished because, not only will rewrite logging create space-eating files, it will seriously impact your web server&amp;#39;s performance. &lt;br /&gt; &lt;br /&gt; &lt;tt&gt;RewriteLogLevel 5&lt;/tt&gt; is very useful, but 2 is probably enough information for most issues.&lt;/p&gt; &lt;div class=&quot;tiny-space&quot; id=&quot;section-debug-report.php&quot;&gt; &lt;/div&gt;
&lt;p&gt; &lt;/p&gt; &lt;h4&gt; &lt;big&gt;&lt;tt&gt;debug-report.php&lt;/tt&gt;&lt;/big&gt;&lt;br /&gt; &lt;small&gt;A php script to make your mod_rewrite life easier !&lt;/small&gt;&lt;/h4&gt;
&lt;p&gt;	When things aren&amp;#39;t working as you would expect, rewrite logging is a good option, but on a hosted server, you probably won&amp;#39;t have that option, without access to httpd.conf. Fortunately, what&amp;#39;s usually required is no more than a quick readout of all the current server variables, &lt;tt&gt;$_GET&lt;/tt&gt; array, and so on ; so you can see &lt;em&gt;exactly&lt;/em&gt; what happened to the request. &lt;br /&gt; &lt;br /&gt; For another purpose, I long ago created &lt;tt&gt;debug.php&lt;/tt&gt;, and later, finding all this information useful in chasing down wonky rewrites, created a &quot;report&quot; version, which rather than output to a file, spits the information straight back into your browser, as well as &lt;tt&gt;$_POST&lt;/tt&gt;, &lt;tt&gt;$_SESSION&lt;/tt&gt;, and &lt;tt&gt;$_SERVER&lt;/tt&gt; arrays, special variables, like &lt;tt&gt;__FILE__&lt;/tt&gt;, and much more. &lt;br /&gt; &lt;br /&gt; Usage is simple ; you make it your &lt;em&gt;target page&lt;/em&gt;, so in a rule like this..&lt;/p&gt; &lt;blockquote&gt; &lt;div class=&quot;blockquote&quot; id=&quot;test-your-rules-with-debug-report-php&quot;&gt; &lt;div class=&quot;codeblock&quot;&gt; RewriteRule ^(.*)\.html$ /catch-all.php ?var=$1&lt;/div&gt; &lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Diaporama Flash Slider 3D gratuit</title>
		<link>http://www.elghafoud.net/Diaporama-Flash-Slider-3D-gratuit.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Diaporama-Flash-Slider-3D-gratuit.html</guid>
		<dc:date>2010-11-19T15:54:03Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Voici CU3ER une slideshow Flash XML gratuit 3D image avec transitions au choix. Au programme de ce 3D Image Slider l'option auto-slideshow avec 2 types de pr&#233;-chargement. Les options sont diverses : - choix des transitions - choix des d&#233;lais - choix de la direction de rotation - nombre d'images - couleurs - description pour chaque image - etc.. Libre de droit m&#234;me pour une utilisation commerciale et bien comment&#233; ce petit slider 3D va surement faire des heureux. A (...)

-
&lt;a href="http://www.elghafoud.net/-Graphisme-Web-Design-.html" rel="directory"&gt;Graphisme/Web Design&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	Voici &lt;strong&gt;CU3ER &lt;/strong&gt; une slideshow &lt;a href=&quot;#&quot; onclick=&quot;window.open('http://www.webcssdesign.com/web/flash')&quot;&gt;Flash&lt;/a&gt; XML gratuit 3D image avec transitions au choix. Au programme de ce 3D Image Slider l'option auto-slideshow avec 2 types de pr&#233;-chargement.&lt;br /&gt; Les options sont diverses :&lt;br /&gt; - choix des transitions&lt;br /&gt; - choix des d&#233;lais&lt;br /&gt; - choix de la direction de rotation&lt;br /&gt; - nombre d'images&lt;br /&gt; - couleurs&lt;br /&gt; - description pour chaque image&lt;br /&gt; - etc..&lt;/p&gt; &lt;p&gt;	&lt;span class='spip_document_3 spip_documents spip_documents_center'&gt;
&lt;img src='http://www.elghafoud.net/local/cache-vignettes/L500xH169/flash-3d-slider-01-ade38.jpg' width='500' height='169' alt=&quot;&quot; style='height:169px;width:500px;' /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;	&lt;span class='spip_document_4 spip_documents spip_documents_center'&gt;
&lt;img src='http://www.elghafoud.net/local/cache-vignettes/L500xH164/flash-3d-slider-02-f000c.jpg' width='500' height='164' alt=&quot;&quot; style='height:164px;width:500px;' /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;	Libre de droit m&#234;me pour une utilisation commerciale et bien comment&#233; ce petit slider 3D va surement faire des heureux.&lt;br /&gt; A d&#233;couvrir donc rapidement avant qu'ils ne changent d'avis.&lt;/p&gt; &lt;p&gt;	Site Web : &lt;a href=&quot;#&quot; onclick=&quot;window.open('http://www.progressivered.com/cu3er')&quot; rel=&quot;nofollow&quot;&gt;CU3ER&lt;/a&gt;&lt;br /&gt; Documentation : &lt;a href=&quot;#&quot; onclick=&quot;window.open('http://www.progressivered.com/cu3er/docs')&quot; rel=&quot;nofollow&quot;&gt;Documentation&lt;/a&gt;&lt;br /&gt; T&#233;l&#233;chargement : &lt;a href=&quot;#&quot; onclick=&quot;window.open('http://www.progressivered.com/cu3er/download')&quot; rel=&quot;nofollow&quot;&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Bient&#244;t la V3</title>
		<link>http://www.elghafoud.net/Bientot-la-V3.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Bientot-la-V3.html</guid>
		<dc:date>2010-11-18T15:02:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Bonjour &#224; tous ! Une nouvelle version du site imouzzer-kandar.net sera prochainement disponible. Quelques mois apr&#232;s la parution de la version &#171; 2.5 &#187;, c&amp;#39;est une version &#171; 3.0 &#187; qui est presque finalis&#233;e. Imouzzer-kandar.net sera dot&#233; d&amp;#39;une nouvelle interface graphique et d&amp;#39;une nouvelle mani&#232;re d&amp;#39;acc&#233;der &#224; ses flux d&amp;#39;information.

-
&lt;a href="http://www.elghafoud.net/-Imouzzer-Kandar-.html" rel="directory"&gt;Imouzzer Kandar&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	Bonjour &#224; tous !&lt;br /&gt; &lt;br /&gt; Une nouvelle version du site &lt;a href=&quot;http://www.imouzzer-kandar.net/&quot; target=&quot;_blank&quot;&gt;imouzzer&lt;/a&gt;-kandar.net sera prochainement disponible. &lt;br /&gt; Quelques mois apr&#232;s la parution de la version &#171; 2.5 &#187;, c&amp;#39;est une version &#171; 3.0 &#187; qui est presque finalis&#233;e.&lt;br /&gt; &lt;br /&gt; &lt;a href=&quot;http://www.imouzzer-kandar.net/&quot; target=&quot;_blank&quot;&gt;Imouzzer-kandar.net &lt;/a&gt;sera dot&#233; d&amp;#39;une nouvelle interface graphique et d&amp;#39;une nouvelle mani&#232;re d&amp;#39;acc&#233;der &#224; ses flux d&amp;#39;information.&lt;br /&gt; &lt;br /&gt; &lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>INSERT IF NOT EXISTS</title>
		<link>http://www.elghafoud.net/INSERT-IF-NOT-EXISTS.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/INSERT-IF-NOT-EXISTS.html</guid>
		<dc:date>2010-11-13T10:15:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 (...)

-
&lt;a href="http://www.elghafoud.net/-MySQL-.html" rel="directory"&gt;MySQL&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	&lt;meta content=&quot;text/html; charset=utf-8&quot; equiv=&quot;Content-Type&quot; /&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot; /&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot; /&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot; /&gt;&lt;link href=&quot;file:///C:%5Ctemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot; /&gt;&lt;link href=&quot;file:///C:%5Ctemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot; /&gt;&lt;link href=&quot;file:///C:%5Ctemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot; /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:WordDocument&gt; &lt;w:View&gt;Normal&lt;/w:View&gt; &lt;w:Zoom&gt;0&lt;/w:Zoom&gt; &lt;w:TrackMoves/&gt; &lt;w:TrackFormatting/&gt; &lt;w:PunctuationKerning/&gt; &lt;w:ValidateAgainstSchemas/&gt; &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt; &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt; &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt; &lt;w:DoNotPromoteQF/&gt; &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt; &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt; &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt; &lt;w:Compatibility&gt; &lt;w:BreakWrappedTables/&gt; &lt;w:SnapToGridInCell/&gt; &lt;w:WrapTextWithPunct/&gt; &lt;w:UseAsianBreakRules/&gt; &lt;w:DontGrowAutofit/&gt; &lt;w:SplitPgBreakAndParaMark/&gt; &lt;w:DontVertAlignCellWithSp/&gt; &lt;w:DontBreakConstrainedForcedTables/&gt; &lt;w:DontVertAlignInTxbx/&gt; &lt;w:Word11KerningPairs/&gt; &lt;w:CachedColBalance/&gt; &lt;/w:Compatibility&gt; &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt; &lt;m:mathPr&gt; &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt; &lt;m:brkBin m:val=&quot;before&quot;/&gt; &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt; &lt;m:smallFrac m:val=&quot;off&quot;/&gt; &lt;m:dispDef/&gt; &lt;m:lMargin m:val=&quot;0&quot;/&gt; &lt;m:rMargin m:val=&quot;0&quot;/&gt; &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt; &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt; &lt;m:intLim m:val=&quot;subSup&quot;/&gt; &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt; &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt; &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot; DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot; LatentStyleCount=&quot;267&quot;&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt; &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt; &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;/p&gt;
&lt;style&gt;
&lt;!-- /* Font Definitions */ @font-face {font-family:&quot;Cambria Math&quot;; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:&quot;&quot;; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:&quot;Times New Roman&quot;,&quot;serif&quot;; mso-fareast-font-family:&quot;Times New Roman&quot;; mso-ansi-language:FR;}
.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;}
@page WordSection1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;}
div.WordSection1 {page:WordSection1;}
--&gt;
&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt; /* Style Definitions */ table.MsoNormalTable &lt;i&gt;mso-style-name :&quot;Table Normal&quot; ; mso-tstyle-rowband-size:0 ; mso-tstyle-colband-size:0 ; mso-style-noshow:yes ; mso-style-priority:99 ; mso-style-qformat:yes ; mso-style-parent :&quot;&quot; ; mso-padding-alt:0cm 5.4pt 0cm 5.4pt ; mso-para-margin:0cm ; mso-para-margin-bottom :.0001pt ; mso-pagination:widow-orphan ; font-size:11.0pt ; font-family :&quot;Calibri&quot;,&quot;sans-serif&quot; ; mso-ascii-font-family:Calibri ; mso-ascii-theme-font:minor-latin ; mso-fareast-font-family :&quot;Times New Roman&quot; ; mso-fareast-theme-font:minor-fareast ; mso-hansi-font-family:Calibri ; mso-hansi-theme-font:minor-latin ; mso-bidi-font-family :&quot;Times New Roman&quot; ; mso-bidi-theme-font:minor-bidi ;&lt;/i&gt;
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Il existe 3 solutions possibles : l&amp;#39;utilisation de INSERT IGNORE, REPLACE, ou INSERT ... ON DUPLICATE KEY UPDATE. ON DUPLICATE KEY UPDATE.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Imaginez que nous avons une table :&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;SQL :&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;CREATE TABLE iphits (&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;ip varchar(50) NOT NULL,&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;dateInsert DATETIME NOT NULL,&lt;span style=&quot;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;PRIMARY KEY&lt;span style=&quot;&quot;&gt; &lt;/span&gt;(ip )&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Pour &#233;viter &#224; chaque fois la v&#233;rification de donn&#233;es (dans notre cas IP), il existe deux m&#233;thodes SQL tr&#232;s simples :&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;strong&gt;&lt;span lang=&quot;FR&quot;&gt;M&#233;thode 1 : REPLACE&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;SQL :&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;REPLACE INTO iphits&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;SET ip = &amp;#39;192.165.1.1&amp;#39;,&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;dateInsert = NOW() ; &lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Si la ligne existe (IP), elle sera remplac&#233;e, si elle n&amp;#39;existe pas encore, il sera cr&#233;&#233;.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Cependant, cette m&#233;thode n&amp;#39;est pas efficace/optimis&#233;e pour notre cas : nous n&amp;#39;avons pas besoin d&amp;#39;&#233;craser les enregistrements existants.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;strong&gt;&lt;span lang=&quot;FR&quot;&gt;M&#233;thode 2 : INSERT IGNORE&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;SQL :&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;INSERT IGNORE INTO iphits&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;SET ip = &amp;#39;192.165.1.1&amp;#39;,&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;span style=&quot;&quot;&gt; &lt;/span&gt;dateInsert = NOW() ;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Ici, si l&amp;#39;ip est d&#233;j&#224; pr&#233;sent dans la table, il sera ignor&#233;. &lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;(Pour &#234;tre plus pr&#233;cis, voici une citation de manuel de r&#233;f&#233;rence MySQL : &lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Si on sp&#233;cifie le mot IGNORE dans un INSERT avec les valeurs de plusieurs lignes, chaque ligne qui ferait doublon avec une cl&#233; PRIMARY ou UNIQUE&lt;span style=&quot;&quot;&gt; &lt;/span&gt;existante dans la table sera ignor&#233; et ne sera pas ins&#233;r&#233;e. Si on ne sp&#233;cifie pas IGNORE, l&amp;#39;insertion est abandonn&#233;e si quelque ligne que ce soit fait doublon avec une cl&#233; existante. La fonction mysql_info() de l&amp;#39;API C permet de savoir combien de lignes ont &#233;t&#233; ins&#233;r&#233;es dans la table.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Cette deuxi&#232;me m&#233;thode pr&#233;sente plusieurs faiblesses potentielles, y compris les non-abondons de la requ&#234;te dans le cas de tout autre probl&#232;me se produit (voir le manuel)&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;Il ya une autre option : &lt;a href=&quot;http://www.elghafoud.net/INSERT-ON-DUPLICATE-KEY-UPDATE.html&quot;&gt;utiliser INSERT ... ON DUPLICATE KEY UPDATE &lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt; &lt;span lang=&quot;FR&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Ajouter automatiquement des ic&#244;nes &#224; vos liens en utilisant jQuery et CSS</title>
		<link>http://www.elghafoud.net/Ajouter-automatiquement-des-icones.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Ajouter-automatiquement-des-icones.html</guid>
		<dc:date>2010-07-30T09:09:07Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>http://cool-javascripts.com/jquery/add-icons-to-your-links-automatically-using-jquery-css.html

-
&lt;a href="http://www.elghafoud.net/-JQuery-.html" rel="directory"&gt;JQuery&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	&lt;a href=&quot;http://cool-javascripts.com/jquery/add-icons-to-your-links-automatically-using-jquery-css.html&quot;&gt;http://cool-javascripts.com/jquery/add-icons-to-your-links-automatically-using-jquery-css.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Combinaison de Ext JS et JQuery</title>
		<link>http://www.elghafoud.net/Combinaison-de-Ext-JS-et-JQuery.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Combinaison-de-Ext-JS-et-JQuery.html</guid>
		<dc:date>2010-07-30T09:08:59Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Hier, j&amp;#39;ai essay&#233; d&amp;#39;apprendre &#224; utiliser JQuery avec Ext en cas de besoin pour des projets futurs. et voici le r&#233;sultat : Les tests ont &#233;t&#233; effectu&#233;es avec les derni&#232;res versions disponibles &#224; savoir : Ext : 3.3 beta Jquery : 1.4.2 CSS et images de ExtJS, &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ext-3.3/resources/css/ext-all.css&quot; /&gt; En suite inclure le script JQuery. &lt;script type=&quot;text/javascript&quot; (...)

-
&lt;a href="http://www.elghafoud.net/-JQuery-.html" rel="directory"&gt;JQuery&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	Hier, j&amp;#39;ai essay&#233; d&amp;#39;apprendre &#224; utiliser JQuery avec Ext en cas de besoin pour des projets futurs. et voici le r&#233;sultat :&lt;br /&gt; Les tests ont &#233;t&#233; effectu&#233;es avec les derni&#232;res versions disponibles &#224; savoir :&lt;br /&gt; &lt;br /&gt; Ext : 3.3 beta&lt;br /&gt; Jquery : 1.4.2&lt;br /&gt; &lt;br /&gt; CSS et images de ExtJS,&lt;br /&gt; &lt;span style=&quot;color: rgb(0,0,205)&quot;&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ext-3.3/resources/css/ext-all.css&quot; /&gt;&lt;br /&gt; &lt;/span&gt;&lt;br /&gt; En suite inclure le script JQuery.&lt;br /&gt; &lt;span style=&quot;color: rgb(0,0,205)&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;jquery/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;&lt;br /&gt; &lt;br /&gt; &lt;/span&gt;Pour combiner ExtJS avec JQuery, vous devez utiliser l&amp;#39;adaptateur JQuery.&lt;br /&gt; &lt;span style=&quot;color: rgb(0,0,205)&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;ext-3.3/adapter/jquery/ext-jquery-adapter.js&quot;&gt;&lt;/script&gt;&lt;br /&gt; &lt;br /&gt; &lt;/span&gt;Et finalement le js d&amp;#39;ExtJS :&lt;br /&gt; &lt;span style=&quot;color: rgb(0,0,205)&quot;&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;ext-3.3/ext-all.js&quot;&gt; &lt;/script&gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; Un exemple est disponible ici :&lt;/p&gt; &lt;p&gt;	&lt;a href=&quot;http://www.elghafoud.net/exemples/jquery/index.php&quot;&gt;http://www.elghafoud.net/exemples/jquery/index.php&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>00. Consultant/Ing&#233;nieur d'&#233;tudes web / Zend Framework</title>
		<link>http://www.elghafoud.net/Consultant-Ingenieur-d-etudes-web.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Consultant-Ingenieur-d-etudes-web.html</guid>
		<dc:date>2010-06-30T14:00:42Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>Depuis Mars 2010 Environnement technique : Oracle, PL/SQL, PHP5, Zend Framework, HTML, XML/XSLT, JavaScript, ExtJS, Zend Studio, SunOS, Windows XP Pro, SQL Developper. Participer au d&#233;veloppement et au support de l&amp;#39;outil Marley pour - L'am&#233;liorer : Optimisation des requ&#234;tes (oracle, MySQL) Optimisation du code source - L&amp;#39;adapter aux &#233;volutions des m&#233;tiers et des technologies - Y cr&#233;er des modules compl&#233;mentaires Ajout de &#171; cron job - batchs de traitement &#187; (...)

-
&lt;a href="http://www.elghafoud.net/-Experiences-.html" rel="directory"&gt;02. Exp&#233;riences&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Depuis Mars 2010&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;	&lt;strong&gt;Environnement technique :&lt;/strong&gt;&lt;br /&gt; Oracle, PL/SQL, PHP5, Zend Framework, HTML, XML/XSLT, JavaScript, ExtJS, Zend Studio, SunOS, Windows XP Pro, SQL Developper.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;	&lt;strong&gt;Participer au d&#233;veloppement et au support de l&amp;#39;outil Marley pour &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;	- L'am&#233;liorer :&lt;/p&gt; &lt;ul&gt; &lt;li&gt; Optimisation des requ&#234;tes (oracle, MySQL)&lt;/li&gt; &lt;li&gt; Optimisation du code source&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;	- L&amp;#39;adapter aux &#233;volutions des m&#233;tiers et des technologies&lt;/p&gt; &lt;p&gt;	- Y cr&#233;er des modules compl&#233;mentaires&lt;/p&gt; &lt;ul&gt; &lt;li&gt; Ajout de &#171; cron job - batchs de traitement &#187;&lt;/li&gt; &lt;li&gt; Conception, d&#233;veloppement et tests&lt;/li&gt; &lt;li&gt; Etude / R&#233;alisation des sp&#233;cifications&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;br /&gt; Marley : suite d&amp;#39;outils intranet d&amp;#39;IT asset management de la SGCIB (banque d&amp;#39;investissement de la Soci&#233;t&#233; G&#233;n&#233;rale), permet au travers de ses diff&#233;rents modules de g&#233;rer l&amp;#39;ensemble du cycle de vie des assets techniques, ainsi que les contrats et co&#251;ts qui y sont rattach&#233;s. Dans le cadre de son d&#233;veloppement et de son ouverture &#224; l&amp;#39;international, l&amp;#39;&#233;quipe en charge de son impl&#233;mentation et de son support n&#233;cessitait d'&#234;tre renforc&#233;e.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Introduction au langage PL/SQL d'Oracle</title>
		<link>http://www.elghafoud.net/Introduction-au-langage-PL-SQL-d.html</link>
		<guid isPermaLink="true">http://www.elghafoud.net/Introduction-au-langage-PL-SQL-d.html</guid>
		<dc:date>2010-05-22T09:11:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>abdel</dc:creator>



		<description>PL SQL ? L'acronyme veut dire Procedural Langage SQL, donc en Francais Langage proc&#233;dural SQL. Si SQL est un langage ensembliste et non proc&#233;dural soumis &#224; une norme (&#224; peu pr&#233;s portable), il n'est pas un langage de programmation. PL/SQL EST un vrai langage de programmation, proc&#233;dural, propre &#224; Oracle et donc NON PORTABLE PL/SQL comme SQL s'ex&#233;cutent sur le moteur de la base de donn&#233;es et non sur le client SQL interpr&#232;te les commandes une &#224; une, Le moteur PL/SQL interpr&#232;te des blocs de (...)

-
&lt;a href="http://www.elghafoud.net/-Oracle-.html" rel="directory"&gt;Oracle&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;	PL SQL ?&lt;br /&gt; L'acronyme veut dire Procedural Langage SQL, donc en Francais Langage proc&#233;dural SQL.&lt;/p&gt; &lt;p&gt;	Si SQL est un langage ensembliste et non proc&#233;dural soumis &#224; une norme (&#224; peu pr&#233;s portable), il n'est pas un langage de programmation.&lt;br /&gt; PL/SQL EST un vrai langage de programmation, proc&#233;dural, propre &#224; Oracle et donc NON PORTABLE&lt;br /&gt; PL/SQL comme SQL s'ex&#233;cutent sur le moteur de la base de donn&#233;es et non sur le client&lt;br /&gt; SQL interpr&#232;te les commandes une &#224; une, Le moteur PL/SQL interpr&#232;te des blocs de commandes (et est donc &#224; priori plus performant)&lt;br /&gt; PL/SQL peut &#234;tre stock&#233; dans la base ou utilis&#233; de mani&#232;re interactive&lt;/p&gt; &lt;h3&gt; Environnements de travail&lt;/h3&gt;
&lt;p&gt;	PL:SQL peut s'utiliser dans les environnement suivants :&lt;br /&gt; Interpr&#233;teurs SQL : SQL*Plus, i*SQLPlus&lt;br /&gt; Pr&#233;compilateurs (Pro*C, Pro*Cobol.) (ca commence &#224; dater !)&lt;br /&gt; Outils de d&#233;veloppement : SQLDeveloper, Designer, Forms, et m&#234;me APEX&lt;br /&gt; Autre langages de d&#233;veloppement : C,C++,Java,PHP&lt;br /&gt; &#8230;&lt;/p&gt; &lt;p&gt;	Le + simple pour d&#233;marrer avec PLSQL est d'utiliser SQL*developper l'outil de d&#233;veloppement gratuit d'Oracle, t&#233;l&#233;chargeable sur &lt;a href=&quot;http://otn.oracle.com/&quot;&gt;http://otn.oracle.com&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; Avantages / inconv&#233;nients&lt;/h3&gt;
&lt;p&gt;	PLSQL est compl&#233;mentaire du SQL (qui lui n'est pas un langage de programmation)&lt;br /&gt; est en g&#233;n&#233;ral stock&#233; dans la base, et permet donc un emeilleure int&#233;gration/coh&#233;rence du code avec les donn&#233;es&lt;br /&gt; permet le traitement par bloc de SQL et donc optimise le trafic r&#233;seau&lt;br /&gt; utilisation de variable de stockage et de type simple et structur&#233; dynamique (%TYPE, %ROWTYPE, etc)&lt;br /&gt; traitements plus complexes, notamment pour la gestion des cas particuliers et des erreurs (traitement des exceptions)&lt;br /&gt; l'utilisation de librairies standards pr&#233;d&#233;finies (supplied PLSQL packages, comme les RDBMS_xxx)&lt;br /&gt; param&#233;trage et cr&#233;ation d'ordres SQL dynamiques.&lt;/p&gt; &lt;h3&gt; Fonctionnalit&#233;s issues de SQL&lt;/h3&gt;
&lt;p&gt;	PL/SQL int&#232;gre des ordres SQL de gestion de la base :&lt;br /&gt; interrogation de donn&#233;es : SELECT&lt;br /&gt; manipulation de donn&#233;es : INSERT, UPDATE, DELETE&lt;br /&gt; gestion transactionnelle : COMMIT, ROLLBACK&lt;br /&gt; fonctions : TO_CHAR, TO_DATE, UPPER, ROUND&#8230;&lt;br /&gt; manipulation de structures : CREATE, ALTER , DROP, RENAME, &#8230;&lt;/p&gt; &lt;p&gt;	rem : Avec les versions ant&#233;rieures &#224; la 9i, Les ordres du LDD ne sont pas support&#233;s par d&#233;faut il faut utiliser un package sp&#233;cial : DBMS_SQL !&lt;/p&gt; &lt;h3&gt; Sp&#233;cificit&#233;s PL/SQL&lt;/h3&gt;
&lt;p&gt;	D&#233;finition de variables simple, et structur&#233;es (tableaux, record)&lt;br /&gt; D&#233;finbitiion de nouveaux types&lt;br /&gt; Traitements conditionnels (if, then , else)&lt;br /&gt; Traitements r&#233;p&#233;titifs (boucles for, while, &#8230;)&lt;br /&gt; Gestion des curseurs&lt;br /&gt; Gestion des erreurs / exceptions&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>

