<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Apache Tips &amp; Tricks: Deny access to certain file types</title> <atom:link href="http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/feed/" rel="self" type="application/rss+xml" /><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/</link> <description>The Journal Of A Linux Sysadmin</description> <lastBuildDate>Sat, 31 Jul 2010 13:48:55 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>By: Un peu de tout &#187; Archives du Blog &#187; sécurisation d&#8217;un serveur Apache : configuration</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-181330</link> <dc:creator>Un peu de tout &#187; Archives du Blog &#187; sécurisation d&#8217;un serveur Apache : configuration</dc:creator> <pubDate>Sun, 29 Nov 2009 04:24:17 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-181330</guid> <description>[...] Apache Tips &amp; Tricks: Deny access to certain file types [...]</description> <content:encoded><![CDATA[<p>[...] Apache Tips &amp; Tricks: Deny access to certain file types [...]</p> ]]></content:encoded> </item> <item><title>By: Failure to Restrict URL Access &#8211; OWASP Top 10 &#8211; A10 &#171; Miscellaneous Security</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-181306</link> <dc:creator>Failure to Restrict URL Access &#8211; OWASP Top 10 &#8211; A10 &#171; Miscellaneous Security</dc:creator> <pubDate>Thu, 19 Nov 2009 18:03:35 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-181306</guid> <description>[...] should block access to all file types that the application doesn’t [...]</description> <content:encoded><![CDATA[<p>[...] should block access to all file types that the application doesn’t [...]</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-178699</link> <dc:creator>John</dc:creator> <pubDate>Sat, 11 Oct 2008 03:57:31 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-178699</guid> <description>Fantastic stuff.  I created a protected directory for my client to satisfy a licensing agreement for distributing materials electronicaly to his students.  The problem is that when the student clicks on a link for a video file, the student would be asked for username and password again each time.  I allowed access to those files viaSatisfy any
Allow from nopasswdBut then, you could access the video directy, if you know the url, bypassing the security.  Jeffery&#039;s post above came to the rescue.  I inserted that in the .htaccess file above my code.  I figured out that you have to set RewriteEngine Off after the RewriteRule.</description> <content:encoded><![CDATA[<p>Fantastic stuff.  I created a protected directory for my client to satisfy a licensing agreement for distributing materials electronicaly to his students.  The problem is that when the student clicks on a link for a video file, the student would be asked for username and password again each time.  I allowed access to those files via</p><p>Satisfy any<br
/> Allow from nopasswd</p><p>But then, you could access the video directy, if you know the url, bypassing the security.  Jeffery&#8217;s post above came to the rescue.  I inserted that in the .htaccess file above my code.  I figured out that you have to set RewriteEngine Off after the RewriteRule.</p> ]]></content:encoded> </item> <item><title>By: rul3z &#187; Blog Archive &#187; Deny access to some folders</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-178598</link> <dc:creator>rul3z &#187; Blog Archive &#187; Deny access to some folders</dc:creator> <pubDate>Sat, 13 Sep 2008 04:37:25 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-178598</guid> <description>[...] information (log files, source code, password files, etc.). The example shown here will address the question posted by Saul Howard on how to deny access to all the subversion directories [...]</description> <content:encoded><![CDATA[<p>[...] information (log files, source code, password files, etc.). The example shown here will address the question posted by Saul Howard on how to deny access to all the subversion directories [...]</p> ]]></content:encoded> </item> <item><title>By: Soma in san diego.</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-178513</link> <dc:creator>Soma in san diego.</dc:creator> <pubDate>Fri, 22 Aug 2008 00:21:36 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-178513</guid> <description>&lt;strong&gt;Akane soma....&lt;/strong&gt;Soma online sales. Soma. Soma and addiction....</description> <content:encoded><![CDATA[<p><strong>Akane soma&#8230;.</strong></p><p>Soma online sales. Soma. Soma and addiction&#8230;.</p> ]]></content:encoded> </item> <item><title>By: Jeremy</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-171090</link> <dc:creator>Jeremy</dc:creator> <pubDate>Tue, 03 Jun 2008 08:17:42 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-171090</guid> <description>A pretty cool .htaccess file I use which is used to prevent random web browsers from accessing folders directly, while allowing them to be accessed via your site. Bassically if someone tried to access yoursite.com/vidoes/1.wmv or something, they would be redirected to a page you specify. But if you had a link at yoursite.com when a user clicks on it takes them to yoursite.com/videos/1.wmv would be allowed. This prevents access to folders/directories and even if a person was to guess the link they wouldn&#039;t be able to access it unless they first came through your site.I did test this with ie and firefox and it seems to work great in each.Code:
AuthUserFile /dev/null
AuthGroupFile /dev/nullRewriteEngine OnRewriteCond %{HTTP_REFERER} !^http://www.yoursite.com.* [NC]
RewriteCond %{HTTP_REFERER} !^http://subdomain.yoursite.com.* [NC]
RewriteCond %{HTTP_REFERER} !^http://.yoursite.com/subfolder.* [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursite.com.* [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/subfolder.* [NC]RewriteRule /* http://www.yoursite.com/index.php [R,L]Just create a .htaccess and insert that code into any subfolder/directory you don&#039;t want anyone to directly access without coming through your site. like yoursite.com/videos/.htaccess (with the above code)RewriteCond = yoursite.com (this is your site, subdomains, and subfolders allowed to access)
RewriteRule = the address they are forwarded to if they try to access directly.Jeremy
dialme.com</description> <content:encoded><![CDATA[<p>A pretty cool .htaccess file I use which is used to prevent random web browsers from accessing folders directly, while allowing them to be accessed via your site. Bassically if someone tried to access yoursite.com/vidoes/1.wmv or something, they would be redirected to a page you specify. But if you had a link at yoursite.com when a user clicks on it takes them to yoursite.com/videos/1.wmv would be allowed. This prevents access to folders/directories and even if a person was to guess the link they wouldn&#8217;t be able to access it unless they first came through your site.</p><p>I did test this with ie and firefox and it seems to work great in each.</p><p>Code:<br
/> AuthUserFile /dev/null<br
/> AuthGroupFile /dev/null</p><p>RewriteEngine On</p><p>RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com.* [NC]<br
/> RewriteCond %{HTTP_REFERER} !^http://subdomain.yoursite.com.* [NC]<br
/> RewriteCond %{HTTP_REFERER} !^http://.yoursite.com/subfolder.* [NC]<br
/> RewriteCond %{HTTP_REFERER} !^http://yoursite.com.* [NC]<br
/> RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/subfolder.* [NC]</p><p>RewriteRule /* <a
href="http://www.yoursite.com/index.php" rel="nofollow">http://www.yoursite.com/index.php</a> [R,L]</p><p>Just create a .htaccess and insert that code into any subfolder/directory you don&#8217;t want anyone to directly access without coming through your site. like yoursite.com/videos/.htaccess (with the above code)</p><p>RewriteCond = yoursite.com (this is your site, subdomains, and subfolders allowed to access)<br
/> RewriteRule = the address they are forwarded to if they try to access directly.</p><p>Jeremy<br
/> dialme.com</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-110178</link> <dc:creator>- Marius -</dc:creator> <pubDate>Thu, 06 Dec 2007 08:18:42 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-110178</guid> <description>Lewy: indeed wordpress removed those lines completely so I can&#039;t see them. Please send them by email (use the contact form to reach me) so I can have a look and tell you my opinion on your question. M.</description> <content:encoded><![CDATA[<p>Lewy: indeed wordpress removed those lines completely so I can&#8217;t see them. Please send them by email (use the contact form to reach me) so I can have a look and tell you my opinion on your question. M.</p> ]]></content:encoded> </item> <item><title>By: Lewy</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-110012</link> <dc:creator>Lewy</dc:creator> <pubDate>Thu, 06 Dec 2007 00:23:06 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-110012</guid> <description>Oops. system ate the files ... /files markup which are present.</description> <content:encoded><![CDATA[<p>Oops. system ate the files &#8230; /files markup which are present.</p> ]]></content:encoded> </item> <item><title>By: Lewy</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-110011</link> <dc:creator>Lewy</dc:creator> <pubDate>Thu, 06 Dec 2007 00:20:59 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-110011</guid> <description>I want to hide .inc files from the web. My .htaccess file looks like this, and hides .htaccess and .cfg files. Access to .inc files is wide open. Any suggestions?# -Hide .htaccess from weborder allow,deny
deny from allAddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
Options -Indexes# -Hide .cfg files from webOrder Allow,Deny
Deny from all# -Hide .inc files from webOrder Allow,Deny
Deny from all </description> <content:encoded><![CDATA[<p>I want to hide .inc files from the web. My .htaccess file looks like this, and hides .htaccess and .cfg files. Access to .inc files is wide open. Any suggestions?</p><p># -Hide .htaccess from web</p><p>order allow,deny<br
/> deny from all</p><p>AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml<br
/> Options -Indexes</p><p># -Hide .cfg files from web</p><p> Order Allow,Deny<br
/> Deny from all</p><p># -Hide .inc files from web</p><p> Order Allow,Deny<br
/> Deny from all</p> ]]></content:encoded> </item> <item><title>By: - Marius -</title><link>http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/comment-page-1/#comment-95700</link> <dc:creator>- Marius -</dc:creator> <pubDate>Fri, 26 Oct 2007 21:43:21 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/07/21/apache-tips-tricks-deny-access-to-certain-file-types/#comment-95700</guid> <description>Sandesh: in order to achieve that your rule needs to look like:
&lt;code&gt;Order deny,allow
Deny from all
Allow from .mydomain.com
&lt;/code&gt; </description> <content:encoded><![CDATA[<p>Sandesh: in order to achieve that your rule needs to look like:<br
/> <code>Order deny,allow<br
/> Deny from all<br
/> Allow from .mydomain.com<br
/> </code></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: www.ducea.com @ 2010-07-31 16:50:38 by W3 Total Cache -->