<?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>iTechLog &#187; .htaccess</title>
	<atom:link href="http://itechlog.com/tag/htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://itechlog.com</link>
	<description>Your source to IT solutions, interesting technology news and a hint of Space and Physics.</description>
	<lastBuildDate>Wed, 09 May 2012 13:02:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>WordPress Media upload HTTP Error</title>
		<link>http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/</link>
		<comments>http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 10:19:10 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache mod_security]]></category>
		<category><![CDATA[HTTP Error]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[swfupload]]></category>
		<category><![CDATA[Wordpress-MU]]></category>

		<guid isPermaLink="false">http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/</guid>
		<description><![CDATA[<a href="http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/" title="Wordpress Media upload HTTP Error"></a>WordPress and WordPress-MU have given me the HTTP error in the various installations I have performed and each time there&#8217;s a different cause. This post is nothing more than a personal notation for future reference but I hope it&#8217;s helpful &#8230;<p class="read-more"><a href="http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/" title="Wordpress Media upload HTTP Error"></a><p><b><a target="_blank" href="http://wordpress.org">WordPress</a> </b>and <a target="_blank" href="http://mu.wordpress.org/"><b>WordPress-MU</b></a> have given me the HTTP error in the various installations I have performed and each time there&#8217;s a different cause. This post is nothing more than a personal notation for future reference but I hope it&#8217;s helpful to someone.</p>
<p>Error: when trying to upload media using the <b>WordPress Flash uploader</b> it get the message <b>HTTP Error</b></p>
<p><b>Disclaimer</b>: <i>before messing with your .htaccess file, make sure you have a backup copy of it in case it causes a 500 Server configuration error. If this happens just replace the .htaccess file with the back up version. Check your code for any mistakes and try again.<br /></i><br />Possible causes:
<ul>
<li><b>mod_security</b> &#8211; basically all Apache servers will have it turned on, so you may need to turn it off for the async-upload.php file using .htaccess. The newer versions of WP have added this code already, but in case you mess up your htaccess file, here it is.&nbsp; Just add the following lines to the bottom of your .htaccess file in the root folder of your WP or WP-MU installation.&nbsp; </li>
</ul>
<div align="center">&lt;IfModule mod_security.c&gt; <br />&lt;Files async-upload.php&gt; <br />SecFilterEngine Off <br />SecFilterScanPOST Off <br />&lt;/Files&gt; <br />&lt;/IfModule&gt;</div>
<p>
<ul>
<li><b>Access Denied Error 403/ Permission issue</b> &#8211; another typical problem. Make sure that the upload folder is writeable by the server, you can set the permission to 754 and it should work fine. In WordPress the upload folder sits under /wp-content/&nbsp; in WP-MU it sits under /blogs.dir/&#8221;blog number&#8221;/files&nbsp; (default site blog number is 1 and the other blogs are numbered in ascending order of creation)</li>
</ul>
<ul>
<li><b>PHP Upload limit</b> &#8211; check you PHP.ini settings for the settings upload_max_filesize and post_max_size. You can change these directly in your PHP.ini if you have access to it or you can change it by adding a php.ini file to you root directory with the following code. The default is normally 2M but you can change it to anything at your own risk, you should not need more then 8M.)</li>
</ul>
<div align="center">post_max_size = 8M<br />upload_max_filesize = 8M</p>
<p>
<div align="left">
<div align="center">or by adding the following lines to your .htaccess file:</div>
<div align="center">php_value upload_max_filesize 8M<br />php_value post_max_size 8M</p>
<p>for anything above 8M you may need to add an execution time to the .htaccess code also<br />php_value max_execution_time  800</p>
</div>
</div>
<div align="left"> </div>
</div>
<ul>
<li><b>Authentication Failed Error 401</b>- I checked my server log and noticed that WordPress was trying to access the 401.shtml error template every time I got the HTTP error during a media upload attempt. This normally occours if you are using password protection for the WordPress root folder or the folder where your uploads should reside. You should disable the password protection on the folder i norder for the uploader to work.</li>
</ul>
<p>Hope it helps. Please leave your contributions and bug reports so others can benefit from it.</p>
<p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=d6acb708-013d-8f9e-9a07-de3417c3833a" /></div>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.htaccess' rel='tag' target='_self'>.htaccess</a>, <a class='technorati-link' href='http://technorati.com/tag/Apache+mod_security' rel='tag' target='_self'>Apache mod_security</a>, <a class='technorati-link' href='http://technorati.com/tag/HTTP+Error' rel='tag' target='_self'>HTTP Error</a>, <a class='technorati-link' href='http://technorati.com/tag/php.ini' rel='tag' target='_self'>php.ini</a>, <a class='technorati-link' href='http://technorati.com/tag/swfupload' rel='tag' target='_self'>swfupload</a>, <a class='technorati-link' href='http://technorati.com/tag/Wordpress' rel='tag' target='_self'>WordPress</a>, <a class='technorati-link' href='http://technorati.com/tag/Wordpress-MU' rel='tag' target='_self'>WordPress-MU</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>January 31, 2011 -- <a href="http://itechlog.com/web-programming/2011/01/31/it-is-not-safe-to-rely-on-the-systems-timezone-settings/" title="It is not safe to rely on the system’s timezone settings">It is not safe to rely on the system’s timezone settings</a></li><li>August 12, 2010 -- <a href="http://itechlog.com/linux/2010/08/12/linuxcon-2010-just-for-fun-poll-results-explained/" title="LinuxCon 2010 Just for Fun Poll Results explained">LinuxCon 2010 Just for Fun Poll Results explained</a></li><li>June 5, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/06/05/keyword-search-and-website-ranking-tools/" title="Keyword search and website ranking tools">Keyword search and website ranking tools</a></li><li>May 12, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/05/12/offline-blogging-tools/" title="Offline Blogging Tools">Offline Blogging Tools</a></li><li>March 27, 2009 -- <a href="http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/" title=".htaccess 301 Redirect">.htaccess 301 Redirect</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>.htaccess 301 Redirect</title>
		<link>http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/</link>
		<comments>http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 15:59:32 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[301 Redirect]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MOD_REWRITE]]></category>
		<category><![CDATA[Search Optimization]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[SEO Book]]></category>

		<guid isPermaLink="false">http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/</guid>
		<description><![CDATA[<a href="http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/" title=".htaccess 301 Redirect"></a>.htaccess files (or &#8220;distributed configuration files&#8221;) provide a way to make configuration changes on a per-directory basis in an Apache HTTP Server. This file, containing one or more configuration directives, is placed in a particular document directory, and the directives &#8230;<p class="read-more"><a href="http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/" title=".htaccess 301 Redirect"></a><p><b><code>.htaccess</code></b> files (or &#8220;distributed configuration files&#8221;)    provide a way to make configuration changes on a per-directory basis in an <b>Apache HTTP Server</b>. This    file, containing one or more configuration directives, is placed in a    particular document directory, and the directives apply to that    directory, and all subdirectories thereof.</p>
<p>This <b>301&nbsp; Redirect</b> can be used anytime you want to redirect a URL. Here are some examples of its use:</p>
<ul>
<li>Single page &#8211; Redirect 301 /old_page.html http://www.mysite.com/new_page.html</li>
</ul>
<ul>
<li>entire site -&nbsp;&nbsp; Redirect 301 /&nbsp; http://www.new_site.com/</li>
</ul>
<ul>
<li>c<a href="http://www.amazon.co.uk/gp/product/0470100923?ie=UTF8&amp;tag=costafamily-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0470100923" target="_blank"><img style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="https://images-na.ssl-images-amazon.com/images/I/5184%2B7hkqxL._SL160_.jpg" alt="" align="left" border="0" /></a>hange file extension (html to php in this case) -&nbsp; RedirectMatch 301 (.*)\.html$ http://www.mysite.com$1.php</li>
</ul>
<p>There are many other uses for Redirect 301 and <a target="_blank" href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite on Apache</a>, if you are moving a site or redesigning a site with a new CMS make sure you redirect your old URLs to your new site. By failing to do so any user that clicks on a link to your old site (page) will hit a 404 ERROR page, this will affect your search rankings.&nbsp; </p>
<p>The book &#8220;<a target="_blank" href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/"><b>Professional SEO</b></a>&#8221; has a good chapter in<b> mod_rewrite and URL redirectio</b>n, and is also great SEO manual</p>
<p>For a full <a target="_blank" href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">tutorial on .htaccess</a> visit the official Apache website.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=f4dc6eb8-fe8d-8f5f-b316-e99a32d6f252" /></div>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.htaccess' rel='tag' target='_self'>.htaccess</a>, <a class='technorati-link' href='http://technorati.com/tag/301+Redirect' rel='tag' target='_self'>301 Redirect</a>, <a class='technorati-link' href='http://technorati.com/tag/Apache' rel='tag' target='_self'>Apache</a>, <a class='technorati-link' href='http://technorati.com/tag/MOD_REWRITE' rel='tag' target='_self'>MOD_REWRITE</a>, <a class='technorati-link' href='http://technorati.com/tag/Search+Optimization' rel='tag' target='_self'>Search Optimization</a>, <a class='technorati-link' href='http://technorati.com/tag/SEO' rel='tag' target='_self'>SEO</a>, <a class='technorati-link' href='http://technorati.com/tag/SEO+Book' rel='tag' target='_self'>SEO Book</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>December 4, 2008 -- <a href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Search Engine Optimization  SEO in PHP (Book)">Search Engine Optimization  SEO in PHP (Book)</a></li><li>August 12, 2010 -- <a href="http://itechlog.com/linux/2010/08/12/linuxcon-2010-just-for-fun-poll-results-explained/" title="LinuxCon 2010 Just for Fun Poll Results explained">LinuxCon 2010 Just for Fun Poll Results explained</a></li><li>January 7, 2010 -- <a href="http://itechlog.com/linux/2010/01/07/linux-clearos-to-rival-microsofts-sbs/" title="Linux ClearOS to rival Microsoft&#8217;s SBS">Linux ClearOS to rival Microsoft&#8217;s SBS</a></li><li>August 26, 2009 -- <a href="http://itechlog.com/wordpress/2009/08/26/wordpress-media-upload-http-error/" title="Wordpress Media upload HTTP Error">Wordpress Media upload HTTP Error</a></li><li>June 5, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/06/05/keyword-search-and-website-ranking-tools/" title="Keyword search and website ranking tools">Keyword search and website ranking tools</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

