<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://mirmodynamics.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Mirmo Dynamics - Tag - apache</title>
  <link>http://mirmodynamics.com/</link>
  <atom:link href="http://mirmodynamics.com/feed/tag/apache/rss2" rel="self" type="application/rss+xml"/>
  <description>Rien de grand ne se fit jamais sans enthousiasme.</description>
  <language>en</language>
  <pubDate>Wed, 03 Dec 2008 17:01:33 +0100</pubDate>
  <copyright>2003-2008 &amp;copy; Geoffrey Bachelet</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Apache and mod_rewrite to subdirectories</title>
    <link>http://mirmodynamics.com/post/2008/06/26/Apache-and-mod_rewrite-to-subdirectories</link>
    <guid isPermaLink="false">urn:md5:e1fd6a0a067fd54399d7439b28f06814</guid>
    <pubDate>Thu, 26 Jun 2008 18:17:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Geekeries</category>
        <category>apache</category><category>mod_rewrite</category><category>naneau</category>    
    <description>    &lt;p&gt;&lt;a href=&quot;http://naneau.nl&quot;&gt;Naneau&lt;/a&gt; just poke me with a little problem he had with &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html&quot;&gt;mod_rewrite&lt;/a&gt; when trying to rewrite to a subdirectory. Imagine you've got the following setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apache's document root is /document_root/&lt;/li&gt;
&lt;li&gt;You application's bootstrap is /document_root/public/index.php&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You could come to the following rewrite rules quite easily:&lt;/p&gt;

&lt;pre&gt;
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/index.php/$1 [L]
&lt;/pre&gt;


&lt;p&gt;And you'd be horribly wrong.&lt;/p&gt;


&lt;p&gt;The problem here is that when you hit &lt;code&gt;/&lt;/code&gt; on your server, mod_rewrite will populate &lt;code&gt;%{REQUEST_FILENAME}&lt;/code&gt; it to &lt;code&gt;/document_root/&lt;/code&gt;, which obviously fails the &lt;code&gt;!-d&lt;/code&gt; rewrite condition. By the magic of &lt;code&gt;DirectoryIndex&lt;/code&gt;, you'll eventually hit &lt;code&gt;/index.html&lt;/code&gt; (or whatever your directory index is set to), and there we go for another rewrite magic. At this point, things get a little messy, and if you're like naneau, you'll end up crying while rolling on the floor and calling for help on irc (that's quite a set of hard things to achieve at the same time).&lt;/p&gt;


&lt;p&gt;The solution is not that simple, and actually, I've not found a fully satisfying solution yet (although naneau is satisfied with the partial solution). The quick hack is to simpy remove the &lt;code&gt;!-d&lt;/code&gt; condition. The obvious drawback is that any existing directory &lt;strong&gt;will&lt;/strong&gt; get rewritten, but you'll be able to access the files inside it. I'm still working on a more complete solution, but as it's not my main concerne for the moment, it'll wait a bit (unless someone posts a solution in the comments).&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2008/06/26/Apache-and-mod_rewrite-to-subdirectories#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2008/06/26/Apache-and-mod_rewrite-to-subdirectories#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/1107</wfw:commentRss>
      </item>
    
  <item>
    <title>Edgy Eft, Dotdeb, php5-pdo-mysql, et moi</title>
    <link>http://mirmodynamics.com/post/2006/10/01/Edgy-Eft-Dotdeb-php5-pdo-mysql-et-moi</link>
    <guid isPermaLink="false">urn:md5:cada8260083979d00e67ac977cd4ac6b</guid>
    <pubDate>Sun, 01 Oct 2006 04:25:00 +0200</pubDate>
    <dc:creator>Geoffrey</dc:creator>
        <category>Geekeries</category>
        <category>apache</category><category>apt</category><category>dotdeb</category><category>php</category><category>ubuntu</category>    
    <description>    &lt;p&gt;Bon voilà, ce n'est un secret pour personne, j'ai mis à jour ma Dapper en Edgy, et après avoir laborieusement activé l'accélération &lt;acronym&gt;3D&lt;/acronym&gt; de ma carte graphique, je me suis attelé à la reconstitution de mon environnement de développement favori: &lt;acronym&gt;LAMP5&lt;/acronym&gt;. Cet enrivonnement comprend de plus l'extension PDO Mysql, très utile dans le cadre de l'utilisation du Zend Framework :-) Seulement voilà, Edgy propose un paquet php5 plus à jour que celui de &lt;a href=&quot;http://www.dotdeb.org/&quot;&gt;dotdeb&lt;/a&gt;, ce qui empêche l'installation du paquet php5-pdo-mysql de dotdeb. Ayant mieux à faire qu'installer pdo_mysql via pear, j'ai décidé d'apprendre à me servir un peu d'&lt;acronym&gt;APT&lt;/acronym&gt;, et je me propose de vous faire part de mes conclusions. Commençons par le commencement, le message d'erreur:&lt;/p&gt;


&lt;pre&gt;Les paquets suivants contiennent des dépendances non satisfaites :
  php5-pdo-mysql: Dépend: phpapi-20041225
                  Dépend: php5-common (= 5.1.6-0.dotdeb.2) mais 5.1.6-1ubuntu1 devra être installé
E: Paquets défectueux&lt;/pre&gt;


&lt;p&gt;Il suffit donc de spécifier à &lt;acronym&gt;APT&lt;/acronym&gt; que nous souhaitons utiliser la version &lt;code&gt;5.1.6-0.dotdeb.2&lt;/code&gt; du paquet &lt;code&gt;php5-common&lt;/code&gt;. Rien de plus simple ! Cela se passe dans &lt;code&gt;/etc/apt/preferences&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;Package: php5-common
Pin: version 5.1.6-0.dotdeb.2
Pin-Priority: 1001&lt;/pre&gt;


&lt;p&gt;Et comme &lt;code&gt;libapache2-mod-php5&lt;/code&gt; dépend également de &lt;code&gt;php5-common&lt;/code&gt;, il va nous falloir faire de même:&lt;/p&gt;


&lt;pre&gt;Package: libapache2-mod-php5
Pin: version 5.1.6-0.dotdeb.2
Pin-Priority: 1001&lt;/pre&gt;


&lt;p&gt;Voilà, désormais &lt;acronym&gt;APT&lt;/acronym&gt; n'installera que la version &lt;code&gt;5.1.6-0.dotdeb.2&lt;/code&gt; de ces deux paquets, quoiqu'il arrive. Un simple &lt;code&gt;apt-get install php5-pdo-mysql&lt;/code&gt; suffit désormais pour que tout rentre dans l'ordre !&lt;/p&gt;


&lt;p&gt;A noter: &lt;a href=&quot;http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.fr.html#s-pin&quot;&gt;le tutoriel qui m'a tout appris&lt;/a&gt;.&lt;/p&gt;</description>
    
    
    
          <comments>http://mirmodynamics.com/post/2006/10/01/Edgy-Eft-Dotdeb-php5-pdo-mysql-et-moi#comment-form</comments>
      <wfw:comment>http://mirmodynamics.com/post/2006/10/01/Edgy-Eft-Dotdeb-php5-pdo-mysql-et-moi#comment-form</wfw:comment>
      <wfw:commentRss>http://mirmodynamics.com/feed/atom/comments/637</wfw:commentRss>
      </item>
    
</channel>
</rss>