<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Loogaroo : Lamp / web 2.0 / Ajax ... &#187; Apache</title>
	<atom:link href="http://loogaroo.net/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://loogaroo.net</link>
	<description></description>
	<lastBuildDate>Tue, 14 Jul 2009 17:48:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Astuces rewrite&#8230;.</title>
		<link>http://loogaroo.net/2007/10/03/astuces-rewrite/</link>
		<comments>http://loogaroo.net/2007/10/03/astuces-rewrite/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 17:22:51 +0000</pubDate>
		<dc:creator>Manu</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[mod rewrite]]></category>

		<guid isPermaLink="false">http://loogaroo.net/2007/10/03/astuces-rewrite/</guid>
		<description><![CDATA[Avant je ne faisais pas attention au moteur de recherche et a l&#8217;optimisation des pages. Mais c&#8217;est vrai que ca permet quand même de récupérer pas mal d&#8217;utilisateurs parfois. Voila le cas des parcours sur Wanarun.
avant j&#8217;avais des urls du genre :
http://www.wanarun.net/index.php?content=/view/parcours.php&#38;parcours=2251
et j&#8217;ai décidé d&#8217;activer le mode rewrite pour obtenir ca :
http://www.wanarun.net/carte/2251/le-long-du-canal-thaon-les-vosges.html
Je ne vous cache [...]]]></description>
			<content:encoded><![CDATA[<p>Avant je ne faisais pas attention au moteur de recherche et a l&#8217;optimisation des pages. Mais c&#8217;est vrai que ca permet quand même de récupérer pas mal d&#8217;utilisateurs parfois. Voila le cas des parcours sur Wanarun.</p>
<p>avant j&#8217;avais des urls du genre :</p>
<p>http://www.wanarun.net/index.php?content=/view/parcours.php&amp;parcours=2251</p>
<p>et j&#8217;ai décidé d&#8217;activer le mode rewrite pour obtenir ca :</p>
<p>http://www.wanarun.net/carte/2251/le-long-du-canal-thaon-les-vosges.html</p>
<p>Je ne vous cache pas que Google adore ce genre d&#8217;URL</p>
<p>Voila le code que j&#8217;ai mis dans mon fichier .htaccess :</p>
<pre>
RewriteEngine On
RewriteRule ^carte/([0-9]+)/(.*).html$ index.php?content=/view/parcours.php&amp;parcours=$1</pre>
<p>Ensuite pour rediriger proprement les anciennes pages j&#8217;ai ajouté ce code dans ma page</p>
<div style="overflow: auto; width: 450px;padding-bottom: 15px;"><div class="php" style="color: #000066; border-left: 5px solid rgb(195, 215, 234); background-color: rgb(240, 240, 240); padding:1px;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;SCRIPT_NAME&quot;</span><span style="color: #66cc66;">&#93;</span>==<span style="color: #ff0000;">&quot;/index.php&quot;</span> &amp;<span style="color: #808080; font-style: italic;">#038;&amp;#038; urlParcours($parc_d)!=$_SERVER[&quot;REDIRECT_URL&quot;])</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'HTTP/1.1 301 Moved Permanently'</span><span style="color: #66cc66;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;location: &quot;</span>.urlParcours<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$parc_d</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #000066;">exit</span></a>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></div></div>
<p>ma fonction urlParcours renvoit l&#8217;url propre tout simplement.</p>

<div class="sociable">
<span class="sociable_tagline">
<strong>Partager et découvrir :</strong>
	<span>Ces icônes sont des liens vers des sites de partage de signet sociaux où les lecteurs peuvent partager et découvrir de nouveaux liens.</span>
</span>
<ul>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite...." title="bodytext"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/digg.png" title="bodytext" alt="bodytext" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://del.icio.us/post?url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite...." title="del.icio.us"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.netvouz.com/action/submitBookmark?url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite....&amp;popup=no" title="Netvouz"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/netvouz.png" title="Netvouz" alt="Netvouz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite...." title="description"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/dzone.png" title="description" alt="description" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.thisnext.com/pick/new/submit/sociable/?url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;name=Astuces%20rewrite...." title="ThisNext"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/thisnext.png" title="ThisNext" alt="ThisNext" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;bm_description=Astuces%20rewrite....&amp;plugin=soc" title="MisterWong"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/misterwong.gif" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://wists.com/s.php?c=&amp;r=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite...." title="Wists"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/wists.png" title="Wists" alt="Wists" class="sociable-hovers sociable_wists" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.scoopeo.com/scoop/new?newurl=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F&amp;title=Astuces%20rewrite...." title="Scoopeo"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/scoopeo.png" title="Scoopeo" alt="Scoopeo" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F" title="Technorati"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.wikio.com/vote?url=http%3A%2F%2Floogaroo.net%2F2007%2F10%2F03%2Fastuces-rewrite%2F" title="Wikio"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/wikio.gif" title="Wikio" alt="Wikio" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://loogaroo.net/2007/10/03/astuces-rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
