<?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>dev/null &#187; mod_redirect</title>
	<atom:link href="http://devnull.fuoriradio.com/tag/mod_redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://devnull.fuoriradio.com</link>
	<description>appunti interessanti e non di un programmatore</description>
	<lastBuildDate>Tue, 19 Apr 2011 15:22:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Usare Friendly URLS &amp; Feedburner con WordPress su Lighttpd.</title>
		<link>http://devnull.fuoriradio.com/2010/01/24/usare-friendly-urls-feedburner-con-wordpress-su-lighttpd/</link>
		<comments>http://devnull.fuoriradio.com/2010/01/24/usare-friendly-urls-feedburner-con-wordpress-su-lighttpd/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 14:22:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[friendly urls]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mod_redirect]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://devnull.fuoriradio.com/?p=42</guid>
		<description><![CDATA[Normalmente viene fornita la sintassi del file .htaccess di apache necessario per abilitare i Friendly Url su WordPress, e i plugin per FeedBurner agiscono appunto sul file .htaccess per aggiungere le regole necessarie al corretto redirect dei feed verso feedburner. Nulla di tutto questo funziona su Lighttpd, vediamo quindi come ottenerlo modificando la configurazione del [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float:left; margin: 8px" src="http://snapcasa.com/get.aspx?code=9019&size=l&url=http%3A%2F%2Fwordpress.org%2F"/ ></p>
<p>Normalmente viene fornita la sintassi del file .htaccess di apache necessario per abilitare i Friendly Url su WordPress, e i plugin per FeedBurner agiscono appunto sul file .htaccess per aggiungere le regole necessarie al corretto redirect dei feed verso feedburner. Nulla di tutto questo funziona su Lighttpd, vediamo quindi come ottenerlo modificando la configurazione del nostro web server preferito.</p>
<p><span id="more-42"></span></p>
<p>Per prima cosa editiamo il file di configurazione:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>lighttpd<span style="color: #000000; font-weight: bold;">/</span>lighttpd.conf</pre></div></div>

<p>(Usate l&#8217;editor che preferite che sia Vi o Pico o Nano non ha importanza <img src='http://devnull.fuoriradio.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  )</p>
<p>Ora controlliamo la presenza dei moduli necessari tra quelli attivati in Lighttpd, ci servono i moduli mod_rewrite e mod_redirect:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## modules to load</span>
<span style="color: #666666; font-style: italic;"># mod_access, mod_accesslog and mod_alias are loaded by default</span>
<span style="color: #666666; font-style: italic;"># all other module should only be loaded if neccesary</span>
<span style="color: #666666; font-style: italic;"># - saves some time</span>
<span style="color: #666666; font-style: italic;"># - saves memory</span>
&nbsp;
server.modules              = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
            <span style="color: #ff0000;">&quot;mod_access&quot;</span>,
            <span style="color: #ff0000;">&quot;mod_alias&quot;</span>,
<span style="color: #666666; font-style: italic;">#            &quot;mod_accesslog&quot;,</span>
            <span style="color: #ff0000;">&quot;mod_rewrite&quot;</span>,
            <span style="color: #ff0000;">&quot;mod_fastcgi&quot;</span>,
            <span style="color: #ff0000;">&quot;mod_redirect&quot;</span>,
<span style="color: #666666; font-style: italic;">#           &quot;mod_status&quot;,</span>
            <span style="color: #ff0000;">&quot;mod_evhost&quot;</span>,
            <span style="color: #ff0000;">&quot;mod_compress&quot;</span>,
<span style="color: #666666; font-style: italic;">#           &quot;mod_usertrack&quot;,</span>
<span style="color: #666666; font-style: italic;">#           &quot;mod_rrdtool&quot;,</span>
<span style="color: #666666; font-style: italic;">#           &quot;mod_webdav&quot;,</span>
<span style="color: #666666; font-style: italic;">#           &quot;mod_expire&quot;,</span>
<span style="color: #666666; font-style: italic;">#           &quot;mod_flv_streaming&quot;,</span>
<span style="color: #666666; font-style: italic;">#           &quot;mod_evasive&quot;</span>
 <span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Se non sono commentati (#) è okay possiamo continuare, andiamo verso il virtual host che ospita il nostro blog.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$HTTP</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;host&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> =~ <span style="color: #ff0000;">&quot;^mioblog.esempio\.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
            server.document-root = <span style="color: #ff0000;">&quot;/home/mioblog/wordpress&quot;</span>
url.rewrite = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
<span style="color: #ff0000;">&quot;^/(wp-.+).*/?&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;$0&quot;</span>,
<span style="color: #ff0000;">&quot;^/(sitemap.xml)&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;$0&quot;</span>,
<span style="color: #ff0000;">&quot;^/(robots.txt)&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;$0&quot;</span>,
<span style="color: #ff0000;">&quot;^/(xmlrpc.php)&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;$0&quot;</span>,
<span style="color: #ff0000;">&quot;^/(.+)/?$&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;/index.php/$1&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">$HTTP</span><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;useragent&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">!</span>~ <span style="color: #ff0000;">&quot;FeedBurner&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
           url.redirect = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
              <span style="color: #ff0000;">&quot;/feed*&quot;</span> =<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #ff0000;">&quot;http://feeds.feedburner.com/[feed del mio blog]&quot;</span>
           <span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Abbiate la cura di mettere gli url i path e il nome del feed corretto, salvate il file, uscite dall&#8217;editor e riavviate lighttpd con:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>lighttpd restart</pre></div></div>

<p>(Questo funziona su Debian, potreste avere un comando diverso a seconda della vostra Distro)</p>
<p>Ora nel pannello Site Admin del vostro WordPress selezionate Settings -&gt; Permalinks e togliete quel brutto index.php dal vostro sito web.<br />
Per feedburner invece non dobbiamo modificare alcunchè i feed saranno automaticamente reindirizzati.</p>
<p><div style="text-align: center"><script type="text/javascript"><!--
google_ad_client = "pub-9763589373223061";
/* 468x60, devnull */
google_ad_slot = "9717154544";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdevnull.fuoriradio.com%2F2010%2F01%2F24%2Fusare-friendly-urls-feedburner-con-wordpress-su-lighttpd%2F&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://devnull.fuoriradio.com/2010/01/24/usare-friendly-urls-feedburner-con-wordpress-su-lighttpd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

