Svn – Use WebSVN as default HTML view

apache-2.2svn

when opening an subversion URL like https://server.local/svn/reproname using a normal webbrowser I get a (not very nice but useful) webpage showing me the files of the highest revision of the repository.

Is it possible to change this HTML-view to use WebSVN instead? So I want to use the same URL for TortoiseSVN which then browses the repository using WebDAV and for browsing it with a webbrowser getting the nice interface of WebSVN.

I am using Apache 2.2 on an Win 2003 Server with mod_dav_svn.

Thanks in advance for any help.

sc911

Best Answer

What about using mod_rewrite? You could do something like this:-

RewriteCond %{HTTP_USER_AGENT}          !^SVN.*
RewriteRule ^/svn/(.*?)(/.*)$           http://websvn.host/websvn/listing.php?repname=$1&path=$2      [R]

This should redirect any client that doesn't have a User-Agent string starting with 'SVN/' to a WebSVN installation at http://websvn.host/websvn/, and leave queries from SVN clients alone.