<?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>h4x3d.com &#187; htaccess</title>
	<atom:link href="http://h4x3d.com/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://h4x3d.com</link>
	<description>online portfolio of Julian Klewes</description>
	<lastBuildDate>Thu, 24 May 2012 18:50:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Compressing moo.tools (javascript) even further</title>
		<link>http://h4x3d.com/compressing-mootools-javascript-even-further/</link>
		<comments>http://h4x3d.com/compressing-mootools-javascript-even-further/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 09:45:06 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[moo]]></category>
		<category><![CDATA[moo.fx]]></category>
		<category><![CDATA[moo.tools]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/compressing-mootools-javascript-even-further/</guid>
		<description><![CDATA[Moo.tools is neat, I love it and use it whenever I can, but one thing is still bugging me: its size. Even though moo.tools can be downloaded compressed (using the great php5 version of dean edward&#8217;s packer), I personally find 18kb of javascript too much. So I started researching a bit with Google and found [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p><a href="http://mootools.net">Moo.tools</a> is neat, I love it and use it whenever I can, but one thing is still bugging me: its size.<br />
Even though moo.tools can be <a href="http://mootools.net/download">downloaded</a> <em>compressed</em> (using the great php5 version of <a href="http://dean.edwards.name/packer/">dean edward&#8217;s packer</a>), I personally find <b>18kb</b> of javascript too much.</p>
<p><em>So I started researching a bit with Google and found out different way of compressing moo.tools (or actually whatever javascript you have) even further:</em></p>
<p>The first method, which I am using works like this:<br />
+ You rename your javascript file (moo.tools) from the original filename.js to filename.js.<b>php</b><br />
+ Open the file with your favourite editor and add the following line just at the very <em>TOP</em> of the code:</p>
<pre><code>

</code></pre>
<p>+ Next, scroll down to the end of the file in your editor and add the following to the bottom:</p>
<pre><code>

</code></pre>
<p>+ Save your file and upload it.</p>
<p>Now add it to your website using the old HTML code, but keep in mind to add the <b>.php</b>-file extension.<br />
It might look like this:</p>
<pre><code>

</code></pre>
<p class="update">I was able to reduce the whooping 18kb moo.tools down to 9kb this way. Well, actually I did not do anything, but the server and its php and zlib.</p>
<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p>Other methods:<br />
At the top of Javascript:</p>
<pre><code>

</code></pre>
<p>.htaccess method<br />
Save a compressed javascript file as *.jgz, and write .htaccess like this.</p>
<pre><code>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ".*Safari.*" [OR]
RewriteCond %{HTTP:Accept-Encoding} !gzip
RewriteRule (.*)\.jgz$ $1\.js [L]

AddType "text/javascript;charset=UTF-8" .jgz
AddEncoding gzip .jgz
</code></pre>
<div style="float: right;padding: 20px"><!--adsense#200_inlay--></div>
<p>Filesmatch .htaccess method:</p>
<pre><code>

ForceType text/javascript
Header set Content-Encoding: gzip

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule (.*)\.js$ $1\.js.gz [L]
ForceType text/javascript

</code></pre>
<p><u>Sources / Ideas:</u><br />
1. <a href="http://paulstamatiou.com/2007/03/18/how-to-optimize-your-css-even-more/" target="_Blank">paulstamatiou.com</a><br />
2. <a target="_Blank" href="http://joseph.randomnetworks.com/archives/2006/07/13/compressed-javascript/">randomnetworks.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/compressing-mootools-javascript-even-further/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.htaccess cheat sheet</title>
		<link>http://h4x3d.com/htaccess-cheat-sheet/</link>
		<comments>http://h4x3d.com/htaccess-cheat-sheet/#comments</comments>
		<pubDate>Mon, 12 Sep 2005 12:14:59 +0000</pubDate>
		<dc:creator>jez</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[modrewrite]]></category>

		<guid isPermaLink="false">http://www.h4x3d.com/2005/09/12/htaccess-cheat-sheet/</guid>
		<description><![CDATA[Here is a simple cheatsheet for the .htaccess file: Enable Directory Browsing Options +Indexes ## block a few types of files from showing IndexIgnore *.wmv *.mp4 *.aviDisable Directory Browsing Options All -IndexesCustomize Error Messages ErrorDocument 403 /forbidden.html ErrorDocument 404 /notfound.html ErrorDocument 500 /servererror.htmlGet SSI working with HTML/SHTML AddType text/html .html AddType text/html .shtml AddHandler server-parsed [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple cheatsheet for the .htaccess file:</p>
<p>Enable Directory Browsing</p>
<p>Options +Indexes<br />
## block a few types of files from showing<br />
IndexIgnore *.wmv *.mp4 *.aviDisable Directory Browsing</p>
<p>Options All -IndexesCustomize Error Messages</p>
<p>ErrorDocument 403 /forbidden.html<br />
ErrorDocument 404 /notfound.html<br />
ErrorDocument 500 /servererror.htmlGet SSI working with HTML/SHTML</p>
<p>AddType text/html .html<br />
AddType text/html .shtml<br />
AddHandler server-parsed .html<br />
AddHandler server-parsed .shtml<br />
# AddHandler server-parsed .htmChange Default Page (order is followed!)</p>
<p>DirectoryIndex myhome.htm index.htm index.php Block Users from accessing the site<br />
 order deny,allow<br />
deny from 202.54.122.33<br />
deny from 8.70.44.53<br />
deny from .spammers.com<br />
allow from all Allow only LAN usersorder deny,allow<br />
deny from all<br />
allow from 192.168.0.0/24Redirect Visitors to New Page/Directory</p>
<p>Redirect oldpage.html<br />
Redirect /olddir  site from specific referrers</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} site-to-block\.com [NC]<br />
RewriteCond %{HTTP_REFERER} site-to-block-2\.com [NC]<br />
RewriteRule .* &#8211; [F]Block Hot Linking/Bandwidth hogging</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]<br />
RewriteRule \.(gif|jpg)$ &#8211; [F]Want to show a ?Stealing is Bad? message too?</p>
<p>Add this below the Hot Link Blocking code:</p>
<p>RewriteRule \.(gif|jpg)$  [R,L]Stop .htaccess (or any other file) from being viewed</p>
<p>order allow,deny<br />
deny from all<br />
Avoid the 500 Error</p>
<p># Avoid 500 error by passing charset<br />
AddDefaultCharset utf-8Grant CGI Access in a directory</p>
<p>Options +ExecCGI<br />
AddHandler cgi-script cgi pl<br />
# To enable all scripts in a directory use the following<br />
# SetHandler cgi-scriptSave Bandwidth</p>
<p># Only if you use PHP</p>
<p>php_value zlib.output_compression 16386<br />
Password Protecting Directories</p>
<p>Use the .htaccess Password Generator and follow the brief instructions!</p>
<p>The CheckSpelling Directive</p>
<p>From Jens Meiert: CheckSpelling corrects simple spelling errors (for example, if someone forgets a letter or if any character is just wrong). Just add CheckSpelling On to your htaccess file.</p>
<p>The ContentDigest Directive</p>
<p>As the Apache core features documentation says: ?This directive enables the generation of Content-MD5 headers as defined in RFC1864 respectively RFC2068. The Content-MD5 header provides an end-to-end message integrity check (MIC) of the entity-body. A proxy or client may check this header for detecting accidental modification of the entity-body in transit.</p>
<p>Note that this can cause performance problems on your server since the message digest is computed on every request (the values are not cached). Content-MD5 is only sent for documents served by the core, and not by any module. For example, SSI documents, output from CGI scripts, and byte range responses do not have this header.?</p>
<p>To turn this on, just add Content Digest On.</p>
<p>Source: the net / google</p>
]]></content:encoded>
			<wfw:commentRss>http://h4x3d.com/htaccess-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

