You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jani Averbach <ja...@jaa.iki.fi> on 2005/02/28 20:54:24 UTC
SVN working copies, websites, .svn and .htaccess
Hello,
I need some help with our .htaccess configuration:
Is there any way to put to the top most .htaccess file a rule that
will block all sub-tree .svn directories to be served by Apache
HTTPD?
There is a FAQ [1] about how you could do this with httpd.conf, but in
our case we don't have access to the server's main configuration, so
we have to live (and die) with .htaccess files.
The FAQ suggest that for httpd.conf:
# Disallow browsing of Subversion working copy administrative dirs.
<DirectoryMatch "^/.*/\.svn/">
Order deny,allow
Deny from all
</DirectoryMatch>
Any ideas how to do something similar with .htaccess file?
Thanks for any help,
Jani
1) http://subversion.tigris.org/faq.html#website-auto-update
--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: SVN working copies, websites, .svn and .htaccess
Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2005-02-28 17:05-0600, Travis P wrote:
>
> On Feb 28, 2005, at 2:54 PM, Jani Averbach wrote:
>
> >I need some help with our .htaccess configuration:
> >
> >Is there any way to put to the top most .htaccess file a rule that
> >will block all sub-tree .svn directories to be served by Apache
> >HTTPD?
> >
> >There is a FAQ [1] about how you could do this with httpd.conf, but in
> >our case we don't have access to the server's main configuration, so
> >we have to live (and die) with .htaccess files.
>
> This appears to work well enough for me:
> _______
> SetEnvIfNoCase Request_URI "\.svn" ban
>
> Deny from env=ban
> ________
Thanks!
I found that following will also do the trick:
RewriteEngine On
RewriteRule ^(.*/)*\.svn/ / [F,L]
BR, Jani
--
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: SVN working copies, websites, .svn and .htaccess
Posted by Travis P <sv...@castle.fastmail.fm>.
On Feb 28, 2005, at 2:54 PM, Jani Averbach wrote:
> I need some help with our .htaccess configuration:
>
> Is there any way to put to the top most .htaccess file a rule that
> will block all sub-tree .svn directories to be served by Apache
> HTTPD?
>
> There is a FAQ [1] about how you could do this with httpd.conf, but in
> our case we don't have access to the server's main configuration, so
> we have to live (and die) with .htaccess files.
This appears to work well enough for me:
_______
SetEnvIfNoCase Request_URI "\.svn" ban
Deny from env=ban
________
(Yeah, it might be a little broader than strictly necessary, but I'm
not bothered by the corner-cases.)
-Travis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org