<?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>luka8088</title>
	<atom:link href="http://blog.luka8088.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.luka8088.com</link>
	<description>luka8088's blog</description>
	<lastBuildDate>Mon, 22 Jun 2009 11:59:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft browser comparison</title>
		<link>http://blog.luka8088.com/2009/06/22/microsoft-browser-comparison/</link>
		<comments>http://blog.luka8088.com/2009/06/22/microsoft-browser-comparison/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 11:58:26 +0000</pubDate>
		<dc:creator>luka8088</dc:creator>
				<category><![CDATA[Talk]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[browser comparison]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://blog.luka8088.com/?p=49</guid>
		<description><![CDATA[Recently, my friend showed me a link about Microsoft comparing browsers (it is first on Google under &#8220;microsoft browser comparison&#8221; &#8211; I don&#8217;t want to put it here because I don&#8217;t want to increase that&#8217;s link search rating :])
It is, as you can see, a review and comparison of Internet Explorer 8, Firefox 3 nad [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, my friend showed me a link about Microsoft comparing browsers (it is first on Google under &#8220;microsoft browser comparison&#8221; &#8211; I don&#8217;t want to put it here because I don&#8217;t want to increase that&#8217;s link search rating :])</p>
<p>It is, as you can see, a review and comparison of Internet Explorer 8, Firefox 3 nad Chrome 2, and charts says that Internet Explorer 8 is the best browser there is. I can understand Microsoft propaganda, but anyone that has even little experience with those browsers knows that most of it is a lie or half-truth, the truth is, Internet Explorer 8 is much, much better then Internet Explorer 7, but still needs much developement, try it yourself and see&#8230;</p>
<p>My propaganda is to to spread web browsers that fully support web standards so that web developers don&#8217;t have to make hacks for every browser, and Internet Explorer is not only far from that, but in many cases, it is the only browser that still needs special hacks to make page display properly &#8230;</p>
<p>I anyone don&#8217;t know what to use, then use browsers that follow web standars and give support for web developers that would like to use great new web freatures, but they can&#8217;t because of browser&#8217;s lack of support&#8230;</p>
<p>A good place to go is: <a href="http://abetterbrowser.org/" target="_blank">http://abetterbrowser.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.luka8088.com/2009/06/22/microsoft-browser-comparison/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>mod_rewrite</title>
		<link>http://blog.luka8088.com/2009/06/16/mod_rewrite/</link>
		<comments>http://blog.luka8088.com/2009/06/16/mod_rewrite/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 21:54:52 +0000</pubDate>
		<dc:creator>luka8088</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[rewrite subdomain]]></category>
		<category><![CDATA[subdomain]]></category>
		<category><![CDATA[subdomain to directory]]></category>
		<category><![CDATA[subdomain to folder]]></category>

		<guid isPermaLink="false">http://blog.luka8088.com/?p=9</guid>
		<description><![CDATA[Hi, after setting this nice theme, i started organizing the rest on my new site, even before setting up wordpress, i decided to point luka8088.com to one folder (~/public_html), www.luka8088.com to that same folder, and everything else to it&#8217;s sub folder, in other words, blog.luka8088.com is located in www.luka8088.com/blog/ (~/public_html/blog), and so on&#8230; I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, after setting this nice theme, i started organizing the rest on my new site, even before setting up wordpress, i decided to point luka8088.com to one folder (~/public_html), www.luka8088.com to that same folder, and everything else to it&#8217;s sub folder, in other words, blog.luka8088.com is located in www.luka8088.com/blog/ (~/public_html/blog), and so on&#8230; I wanted to make it all automatically using mod_rewrite:</p>
<p>mod_rewrite is apache module that allows complex url rewriting using regular expressions.</p>
<p>So what I did, since mod_rewrite was already enabled on server, I edited .htaccess file located in ~/public_html and tryed to add some rewrite rules but got many problems, and since I am familiar with regexp, I thought how hard then must be for those people that are not, so I wanted to share some tips:</p>
<p>Rewrite rules can be anywhere in configuration, but I will only speak about them in .htaccess context, basically, it is enough to add:</p>
<blockquote><p><strong>RewriteEngine On<br />
RewriteRule rewrite-from rewrite-to</strong></p></blockquote>
<p>Note: If .htaccess does not exists, just create it <img src='http://blog.luka8088.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Example:</p>
<blockquote><p><strong>RewriteEngine On<br />
RewriteRule ^index\.html$ index.php</strong></p></blockquote>
<p>This means: if <strong>^index\.html$</strong> is matched to url, it will be replaced with <strong>index.php</strong> but, not the whole url, if we, for example, open: <strong>http://www.example.com/folder/test/index.html</strong>,</p>
<blockquote><p>if .htaccess is located in <strong>http://www.example.com/folder/test/</strong><br />
then it will compare regexp with <strong>index.html</strong>,</p></blockquote>
<blockquote><p>if .htaccess is in <strong>http://www.example.com/folder/</strong><br />
(<strong>test/</strong> doesn&#8217;t exists or there is no <strong>.htaccess</strong> with rewrite rules inside)<br />
then it will compare regexp with <strong>test/index.html</strong></p></blockquote>
<blockquote><p>and if in <strong>http://www.example.com/</strong><br />
then it will compare regexp with <strong>folder/test/index.html</strong></p></blockquote>
<p>And i want to rewrite <strong>http://test.example.com/</strong> into <strong>http://example.com/test/</strong>, so obviously this was not enough&#8230; but&#8230; I found some other nice directive called <strong>RewriteCond</strong> :], again&#8230; example:</p>
<blockquote><p><strong>RewriteCond %{HTTP_HOST}abcd%{REQUEST_URI}1234 abcd(.*)$</strong></p></blockquote>
<p>RewriteCond compares some text (which can contain variables) with regex, and if true, RewriteRule that follows is evaluated, as you can see in example above&#8230;</p>
<p>So, I tried:</p>
<blockquote><p><strong>RewriteEngine On</strong></p>
<p><strong>RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^([^\.]*)[^\/]*(.*)$<br />
RewriteRule .* /%1%2</strong></p></blockquote>
<p>&#8230; now when we try to open: <strong>http://abc.example.com/test/</strong> RewriteCond will compare <strong>abc.example.com/test/</strong> with given regexp, <strong>([^\.]*)</strong> is everything before first dot, that is <strong>abc</strong>, <strong>[^\/]*</strong> is everything before first slash, and <strong>(.*)</strong> is everything else, that is <strong>/test/</strong>, and we can backreference that parts from RewriteRule using %1 (%1 is backreference from last RewriteCond and $1 is backreference from the same RewriteRule)&#8230;</p>
<p>&#8230; RewriteRule matches <strong>test/</strong> and rewrites it to <strong>/abc/test/</strong>, so, the new url is: <strong>http://abc.example.com/abc/test/</strong> and then <strong>new request is issued, and all this rewriting is done again !!!</strong></p>
<p>Basically, what I want to say is, <strong>.* in RewriteRule is infinite loop in most cases</strong> ! because <strong>abc/test/</strong> is next time rewritten to <strong>abc/abc/test/</strong> and so on &#8230; I wanted to point this out because i had a lot of problems with that.</p>
<p>The solution is to make sure that RewriteRule will rewrite to something that will not match it&#8217;s pattern !</p>
<p>Other thing is, I don&#8217;t know how to rewriting a domain without browser seeing it, even on the same server, so, pointing all subdomains ( <strong>*.luka8088.com</strong> ) to the location ( <strong>~/public_html/</strong> ) does the trick, because now, rewriting from <strong>http://abc.example.com/test/</strong> to <strong>http://www.example.com/abc/test/</strong> is the same as <strong>http://abc.example.com/abc/test/</strong> (no domain rewriting is needed)&#8230;</p>
<p>For infinite recursion, the best thing I came up with is:</p>
<blockquote><p><strong>RewriteEngine On</strong></p>
<p><strong>RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^([^\.]*)[^\/]*(.*)$<br />
RewriteRule (^[^\~]|^$) /~%1%2</strong></p></blockquote>
<p>This means, rewrite only if folder doesn&#8217;t start with ~, and rewrite it so it does start with ~, this way, subfolders have to start with ~, for example:</p>
<blockquote><p><strong>http://abc.example.com/test/</strong> is rewritten to:<br />
<strong>http://abc.example.com/~abc/test</strong> ( ~/public_html/~abc/test )</p></blockquote>
<p>There is one restriction about this, and that is, you can&#8217;t use ~ as first character of root folder in subdomains, because redirect rule would be skipped&#8230;</p>
<p>Related links:</p>
<p style="padding-left: 30px;"><a href="http://www.regular-expressions.info/">http://www.regular-expressions.info/</a><br />
<a href="http://www.regextester.com/">http://www.regextester.com/</a><br />
<a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html</a><br />
<a href="http://httpd.apache.org/docs/2.0/misc/rewriteguide.html">http://httpd.apache.org/docs/2.0/misc/rewriteguide.html</a></p>
<p>Comments, suggestions and questions are always welcome <img src='http://blog.luka8088.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.luka8088.com/2009/06/16/mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>contentEditable</title>
		<link>http://blog.luka8088.com/2009/06/15/contenteditable/</link>
		<comments>http://blog.luka8088.com/2009/06/15/contenteditable/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 14:44:12 +0000</pubDate>
		<dc:creator>luka8088</dc:creator>
				<category><![CDATA[Jokes]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.luka8088.com/?p=24</guid>
		<description><![CDATA[Few weeks ago, while talking with my friend, he again said he wanted to make web based code editor, you know, like notepad2 or notepad++, but web based&#8230; So I decided to try to write something&#8230;. While reading online docs and other people posts, I found an interesting thing, setting attribute contentEditable=&#8221;true&#8221; on any html [...]]]></description>
			<content:encoded><![CDATA[<p>Few weeks ago, while talking with my friend, he again said he wanted to make web based code editor, you know, like notepad2 or notepad++, but web based&#8230; So I decided to try to write something&#8230;. While reading online docs and other people posts, I found an interesting thing, setting attribute <strong>contentEditable=&#8221;true&#8221;</strong> on any html element, makes it&#8217;s content editable by user, and it even works in Internet Explorer !!<br />
The funny part is, you can put it on body, and then, entire page is editable by user <img src='http://blog.luka8088.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
You can try to edit my blog: <a href="javascript:document.body.contentEditable=document.body.contentEditable.length==4?false:true;void(0);">here</a> (just refresh to get everything back as it was)</p>
<p>You can try this Edit Mode switcher by putting it in your bookmarks, add a new Bookmark (or Favorite) and put below code as a href, then on any page you can use that Bookmark to switch to Edit Mode, then change any part of the page that you want, and then turn Edit Mode back off <img src='http://blog.luka8088.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p>javascript:document.body.contentEditable=document.body.contentEditable.length==4?false:true;void(0);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.luka8088.com/2009/06/15/contenteditable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new blog &#8230;</title>
		<link>http://blog.luka8088.com/2009/06/11/a-new-blog/</link>
		<comments>http://blog.luka8088.com/2009/06/11/a-new-blog/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:49:17 +0000</pubDate>
		<dc:creator>luka8088</dc:creator>
				<category><![CDATA[Talk]]></category>

		<guid isPermaLink="false">http://blog.luka8088.com/?p=3</guid>
		<description><![CDATA[Hi, I am Luka and I finally opened this blog because I have a lot of stuff to share, but first, I need to put some other theme :] &#8230; as always, questions are welcome&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Hi, I am Luka and I finally opened this blog because I have a lot of stuff to share, but first, I need to put some other theme :] &#8230; as always, questions are welcome&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.luka8088.com/2009/06/11/a-new-blog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
