From: Frank Lichtenheld Date: Wed, 1 Feb 2006 19:07:22 +0000 (+0000) Subject: * Adapt for current hosting (i.e. packages.debian.net) X-Git-Tag: switch-to-templates~221 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=7c013fa416a5457f6c745f38f6e83af0aad7f9bb;p=deb%2Fpackages.git * Adapt for current hosting (i.e. packages.debian.net) * Add possibility to pass path-info to the search script via PT --- diff --git a/conf/apache.conf b/conf/apache.conf index febd8d6..0fce69b 100644 --- a/conf/apache.conf +++ b/conf/apache.conf @@ -79,24 +79,34 @@ ServerAdmin webmaster@debian.org DocumentRoot /org/packages.debian.org/www/ - ServerName packages.debian.org + ServerName packages.debian.net ErrorLog /var/log/apache/packages.debian.org-error.log CustomLog /var/log/apache/packages.debian.org-access.log combined ScriptAlias /cgi-bin /org/packages.debian.org/cgi-bin/ + ScriptAlias /cgi-old /org/packages.debian.net/cgi-bin/ RewriteEngine on - RewriteRule ^/$ http://www.debian.org/distrib/packages + # we never want to rewrite those URLs + RewriteRule ^/cgi-(bin|old)/ - [L] + +# RewriteRule ^/$ http://www.debian.org/distrib/packages RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N] - RewriteRule ^/src:([^/]+)$ http://packages.debian.org/cgi-bin/search_packages.pl?searchon=sourcenames&version=all&exact=1&keywords=$1 [R,L,NE] + RewriteRule ^/src:([^/]+)$ http://packages.debian.net/cgi-bin/search_packages.pl?searchon=sourcenames&version=all&exact=1&keywords=$1 [R,L,NE] RewriteRule ^/file:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchfiles [R,L,NE] RewriteRule ^/dirs:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchfilesanddirs [R,L,NE] RewriteRule ^/word:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchword [R,L,NE] RewriteRule ^/list:([^/]+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=filelist [R,L,NE] - RewriteCond %{LA-U:SCRIPT_FILENAME} "!-f" - RewriteCond %{LA-U:SCRIPT_FILENAME} "!-d" - RewriteRule ^/([^/]+)$ http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [R,L,NE] + + RewriteCond %{SCRIPT_FILENAME} "!-f" + RewriteCond %{SCRIPT_FILENAME} "!-d" + RewriteRule ^/([^/]+)$ http://packages.debian.net/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [R,L,NE] + + RewriteCond %{SCRIPT_FILENAME} "!-f" + RewriteCond %{SCRIPT_FILENAME} "!-d" + RewriteRule ^/(.+)/([^/]+)$ /cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$2&path=$1 [PT] + # In case we need to disable the site again #