You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Greg Martyn <gm...@verizon.net> on 2004/10/30 10:04:34 UTC

Hiding .svn folders from apache

Hi,
How do I use a .htaccess file to tell apache that it shouldn't serve any files 
located in all the .svn folders in my site?

Thanks.

Re: Hiding .svn folders from apache

Posted by Marcin Gil <mg...@vernet.pl>.
Dnia sobota, 30 października 2004 19:51, David Rees napisał:
> >
> > <Directory ~ "^/\.svn">
> >
> That will only match /.svn in your root directory.  Please have a look
> at how regular expressions work.
>
 <Directory ~ "^/www/.*/[0-9]{3}">

I've taken this directly from manual. And this says that it will match all
/www descendants which contain directories with names with 3 numbers. Right?

-Marcin
-- 
  email#   mgil : vernet pl | GaduGadu ID# 185057
  JID# dentharg : chrome pl | http://marcin.gilusiowy.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Hiding .svn folders from apache

Posted by David Rees <dr...@greenhydrant.com>.
Marcin Gil wrote, On 10/30/2004 10:41 AM:
> Dnia sobota, 30 października 2004 19:32, David Rees napisał:
> 
>><Location ~ "/\.svn">
>>     Order allow,deny
>>     Deny from all
>></Location>
>>
> 
> <Directory ~ "^/\.svn">
>  Order allow, deny
>  Deny from all
> </Directory>
> 
> how 'bout this?

That will only match /.svn in your root directory.  Please have a look 
at how regular expressions work.

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Hiding .svn folders from apache

Posted by Marcin Gil <mg...@vernet.pl>.
Dnia sobota, 30 października 2004 19:32, David Rees napisał:
>
> <Location ~ "/\.svn">
>      Order allow,deny
>      Deny from all
> </Location>
>

<Directory ~ "^/\.svn">
 Order allow, deny
 Deny from all
</Directory>

how 'bout this?

-Marcin
-- 
  email#   mgil : vernet pl | GaduGadu ID# 185057
  JID# dentharg : chrome pl | http://marcin.gilusiowy.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Hiding .svn folders from apache

Posted by David Rees <dr...@greenhydrant.com>.
Greg Martyn wrote, On 10/30/2004 3:44 AM:
> On Saturday 30 October 2004 06:15 am, Marcin Gil wrote:
> 
>>Look at your httpd.conf. There is a section that hides all .ht* files/dirs.
>>Copy and change.
> 
> 
> I followed apache's example:
> 
> <Files ~ "^\.ht">
>     Order allow,deny
>     Deny from all
> </Files>
> 
> ..and tried this:
> 
> <Files "*.svn*">
>     Order allow,deny
>     Deny from all
> </Files>
> 
> ..but it didn't seem to work.
> 
> Any ideas?

Yeah, you didn't copy it as instructed.  :-P

<Files ~ "^\.svn">
     Order allow,deny
     Deny from all
</Files>

But that may not work anyway since .svn is a folder, not a file.

Something like this should work, which should match anything with
"/.svn" in it:

<Location ~ "/\.svn">
     Order allow,deny
     Deny from all
</Location>

-Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Hiding .svn folders from apache

Posted by Marcin Gil <mg...@vernet.pl>.
Dnia sobota, 30 października 2004 12:44, Greg Martyn napisał:
>
> <Files ~ "^\.ht">
           ^^^^^^^
I suppose this is a regular expression.
>     Order allow,deny
>     Deny from all
> </Files>
>
> <Files "*.svn*">
          ^^^^^^
so this should be "\.svn"
>     Order allow,deny
>     Deny from all
> </Files>
>
-Marcin
-- 
  email#   mgil : vernet pl | GaduGadu ID# 185057
  JID# dentharg : chrome pl | http://marcin.gilusiowy.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Hiding .svn folders from apache

Posted by Greg Martyn <gm...@verizon.net>.
On Saturday 30 October 2004 06:15 am, Marcin Gil wrote:
> Dnia sobota, 30 października 2004 12:04, Greg Martyn napisał:
> > How do I use a .htaccess file to tell apache that it shouldn't serve any
> > files located in all the .svn folders in my site?
>
> Look at your httpd.conf. There is a section that hides all .ht* files/dirs.
> Copy and change.

I followed apache's example:

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>


..and tried this:

<Files "*.svn*">
    Order allow,deny
    Deny from all
</Files>


..but it didn't seem to work.

Any ideas?

Thanks.

Re: Hiding .svn folders from apache

Posted by Marcin Gil <mg...@vernet.pl>.
Dnia sobota, 30 października 2004 12:04, Greg Martyn napisał:
> Hi,
> How do I use a .htaccess file to tell apache that it shouldn't serve any
> files located in all the .svn folders in my site?
>
Look at your httpd.conf. There is a section that hides all .ht* files/dirs.
Copy and change.

-Marcin
-- 
  email#   mgil : vernet pl | GaduGadu ID# 185057
  JID# dentharg : chrome pl | http://marcin.gilusiowy.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org