<?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>Blue Horn &#187; troubleshooting</title>
	<atom:link href="http://bluehorn.co.nz/tag/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluehorn.co.nz</link>
	<description>New Zealand Web Design &#38; Development (PHP 5, MySQL, Symfony Framework, Apache, Linux)</description>
	<lastBuildDate>Tue, 29 Nov 2011 22:23:14 +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>How to handle dot in Symfony URL</title>
		<link>http://bluehorn.co.nz/2008/12/04/how-to-handle-dot-in-symfony-url/</link>
		<comments>http://bluehorn.co.nz/2008/12/04/how-to-handle-dot-in-symfony-url/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 07:45:55 +0000</pubDate>
		<dc:creator>Sid</dc:creator>
				<category><![CDATA[Symfony Framework]]></category>
		<category><![CDATA[Symfony Resources]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://bluehorn.co.nz/?p=77</guid>
		<description><![CDATA[This problem with dot in Symfony URL is a common issue faced by developers. I've seen people asking about it few times in the symfony-users mailing list, and in fact I have asked about it once. Here's one recent thread about it in the mailing list. Symptom When you have dot in your Symfony URL, [...]


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>This problem with dot in Symfony URL is a common issue faced by developers. I've seen people asking about it few times in the <a title="Symfony users mailing list (Google group)" href="http://groups.google.co.nz/group/symfony-users" target="_blank">symfony-users mailing list</a>, and in fact I have asked about it once. <a href="http://groups.google.co.nz/group/symfony-users/browse_thread/thread/65d928b601bff9f4" target="_blank">Here's one recent thread about it in the mailing list</a>.<span id="more-77"></span></p>
<h3>Symptom</h3>
<p>When you have dot in your Symfony URL, e.g.: "http://localhost/mysymfonyapp/module1/action1/param1/do.do.do", your web application suddenly behaves incorrectly. Either error or something. After debugging, you'd find that the erratic behavior is caused by parameter 'param1' not containing 'do.do.do' (as it should do ... does?).</p>
<h3>Cause</h3>
<p>I found that the problem is caused by Symfony's web/.htaccess. Especially the following line (red):</p>
<p style="padding-left: 30px;"># we skip all files with .something<br />
<span style="color: #ff0000;"> RewriteCond %{REQUEST_URI} \..+$</span><br />
RewriteCond %{REQUEST_URI} !\.html$<br />
RewriteRule .* - [L]</p>
<p>The above htaccess rule basically (as the comment says) skip all URL with dot in it, because it suppose to be URL to image, css, or javascript files. But sometime we do have dot in URL other than for accessing those files, for example if we pass email address in the URL.</p>
<h3>Solution</h3>
<p>There are two possible solutions that I know of.</p>
<p>One solution is to use question mark formatted parameter (e.g.: "module/action?email=bla@blu.com" as opposed to "module/action/email/bla@blu.com") as pointed out <a href="http://groups.google.co.nz/group/symfony-users/msg/374fdc71de984faf" target="_blank">here</a>. I have not tried this myself but seems like a good solution.</p>
<p>The next possible solution is to modify web/.htaccess to suit your situation. For example, in my situation, I needed the dot because it was for email address. So I added the following line (green) which basically tells apache not to skip the URL even if it has dot if it has @ sign:</p>
<p style="padding-left: 30px;"># we skip all files with .something<br />
RewriteCond %{REQUEST_URI} \..+$<br />
<span style="color: #008000;"> RewriteCond %{REQUEST_URI} !@.+$</span><br />
RewriteCond %{REQUEST_URI} !\.html$<br />
RewriteRule .* - [L]</p>
<p>I hope that helps...</p>
<p>Update:</p>
<ul>
<li>Thanks to Nicolas Perriault from Symfony users mailing list (he developed <a href="http://symfonians.net/" target="_blank">symfonians.net</a>). He uses this .htaccess (<a href="http://pastie.org/330755" target="_blank">http://pastie.org/330755</a>) for <a href="http://symfonians.net/" target="_blank">symfonians.net</a>. I did a quick test and seems to work nicely.<a href="http://symfonians.net/" target="_blank"><br />
</a></li>
</ul>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://bluehorn.co.nz/2008/12/04/how-to-handle-dot-in-symfony-url/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

