<?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>Encodez Blog &#187; htaccess</title>
	<atom:link href="http://encodez.com/blog/category/web-server/htaccess-web-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://encodez.com/blog</link>
	<description>Computer language design is just like a stroll in the park. Jurassic Park, that is. — Larry Wall</description>
	<lastBuildDate>Thu, 22 Jul 2010 05:34:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>My first step to Zend Framework</title>
		<link>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/</link>
		<comments>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:19:57 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=130</guid>
		<description><![CDATA[Good Day !!! I am just keeping my leg in to Zend Framework. Extending the art &#38; spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase. At the first step I faced several problems. Mainly the one was Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' [...]]]></description>
			<content:encoded><![CDATA[<p>Good Day !!!</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>I am just keeping my leg in to <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a>.</p>
<blockquote><p>Extending the art &amp; spirit of PHP, Zend Framework is based     on simplicity, object-oriented best practices, corporate friendly licensing,     and a rigorously tested agile codebase.</p></blockquote>
<p>At the first step I faced several problems. Mainly the one was</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Fatal error: Uncaught exception <span style="color: #ff0000;">'Zend_Controller_Dispatcher_Exception'</span> with message <span style="color: #ff0000;">'Invalid controller specified (error)'</span> <span style="color: #000000; font-weight: bold;">in</span> C:\wamp\library\Zend\Controller\Dispatcher\Standard.php:<span style="color: #000000;">241</span> Stack trace: <span style="color: #666666; font-style: italic;">#0 C:\wamp\library\Zend\Controller\Front.php(934):</span>
 Zend_Controller_Dispatcher_Standard-<span style="color: #000000; font-weight: bold;">&amp;</span>gt;dispatch<span style="color: #7a0874; font-weight: bold;">&#40;</span>Object<span style="color: #7a0874; font-weight: bold;">&#40;</span>Zend_Controller_Request_Http<span style="color: #7a0874; font-weight: bold;">&#41;</span>, 
Object<span style="color: #7a0874; font-weight: bold;">&#40;</span>Zend_Controller_Response_Http<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;">#1 C:\wamp\www\test\zendTest3\html\index.php(6): Zend_Controller_Front-&amp;gt;dispatch() #2 {main} thrown in C:\wamp\library\Zend\Controller\Dispatcher\Standard.php on line 241</span></pre></div></div>

<p>This is what made me fedup on earlier step.</p>
<p>But with my trustful effort I managed to find out the reason why I am getting this error. It was mainly because of Path. The path to <strong>controllers</strong> directory. I guess it is because of the OS what I was using is Windows. Linux users might not get this problem. To overcome this problem, it is best practice to specify the path by calling current directory using the script as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APPLICATION_PATH'</span><span style="color: #009900;">&#41;</span>
or <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APPLICATION_PATH'</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$frontController</span> <span style="color: #339933;">=</span> Zend_Controller_Front<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$frontController</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setControllerDirectory</span><span style="color: #009900;">&#40;</span>APPLICATION_PATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'/controllers'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This is the best coding practice given by Zend. <img src='http://encodez.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Never forget the standards.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Translate Apache URL-Rewrite into Lighttpd for VBulletin tfSEO</title>
		<link>http://encodez.com/blog/2008/10/translate-apache-url-rewrite-lighthttpd-vbulletin-tfseo/</link>
		<comments>http://encodez.com/blog/2008/10/translate-apache-url-rewrite-lighthttpd-vbulletin-tfseo/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:32:11 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[htaccess]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[light httpd]]></category>
		<category><![CDATA[tfseo]]></category>
		<category><![CDATA[url-rewrite]]></category>

		<guid isPermaLink="false">http://www.pc4safe.com/blog/?p=56</guid>
		<description><![CDATA[If you are interested in this topic, I am sure you know about the vbulletin and tfSEO plugin. It is the famouse VBulletin forum software what I have installed. For the SEO part I had installed the tfSEO which was performing well and gave me a good result in a short term. Recently, I was [...]]]></description>
			<content:encoded><![CDATA[<p>If you are interested in this topic, I am sure you know about the vbulletin and tfSEO plugin. It is the famouse VBulletin forum software what I have installed. For the SEO part I had installed the tfSEO which was performing well and gave me a good result in a short term.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Recently, I was facing a terrible bandwidth problem with my forum hosting provider. It was shared hosting which is built on Apache 2. You know, rewriting url work with the help of Apache RewriteEngine which is built on mod_rewrite module. Eventually, I had to change my hosting to a VPS solution. Also I prefered the lighthttpd server as my webserver as it is not heavy and taking less server resourses. Unfortunately I found tfSEO is not supporting lighthttpd as lighthttpd url-rewrite is different and it doesnt have htaccess file support. Ran around several forums. There were no solutions. At the end I refer to lighthttpd documentation and had to built my own url-rewrite. I like to share what I did tfSEO get back into work and it might be useful for some one who can face this in future.</p>
<p>The replaced code of tfSEO from htaccess to lighthttpd url-rewrite</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">url.rewrite-once = <span style="color: #7a0874; font-weight: bold;">&#40;</span>
<span style="color: #ff0000;">&quot;^/forum/([^/]+)/([^/]+)-([0-9]+)\/newpost.html$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showthread.php?t=$3&amp;goto=newpost&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/([^/]+)/([^/]+)-([0-9]+)\/$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showthread.php?t=$3&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/f([0-9]+)\/$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/forumdisplay.php?f=$1&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/f([0-9]+)\/([a-z]+)([0-9]+).html$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/forumdisplay.php?f=$1&amp;page=$3&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/([^/]+)/([^/]+)-t([0-9]+)/page([0-9]+).html$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showthread.php?t=$3&amp;page=$4&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/([^/]+)/([^/]+)-t([0-9]+)/page([0-9]+).html(&amp;page)=([0-9]+)$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showthread.php?t=$3&amp;page=$4&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/([^/]+)/([^/]+)-t([0-9]+)/$&quot;</span>  =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showthread.php?t=$3&quot;</span>,
<span style="color: #ff0000;">&quot;^/forum/f([^/]+)/([^/]+)-([0-9]+)\/post([0-9]+).html$&quot;</span> =<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/forum/showpost.php?p=$4&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></td></tr></table></div>

<p>so on. This will work to VBulletin version 3.6.x and tfSEO version 1.1.3 in httpd webserver running on LXAdmin under Hyper VM.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2008/10/translate-apache-url-rewrite-lighthttpd-vbulletin-tfseo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
