]> git.deb.at Git - deb/packages.git/blobdiff - conf/apache.conf
* Move coniguratio stuf to own module
[deb/packages.git] / conf / apache.conf
index f6e9e03bf95a1601f08c8cdd6e0626c4a03329b3..40c890d2432dfc2d675c2e626a8d338533189f3c 100644 (file)
    ScriptAlias /cgi-old /org/packages.debian.net/cgi-bin/
 
    RewriteEngine on
+   RewriteLog /var/log/apache/rewrite.log
+   RewriteLogLevel 0
 
    # we never want to rewrite those URLs
    RewriteRule ^/cgi-(bin|old)/ - [L]
 
    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]
+   RewriteRule ^/([^/]+)$ /cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [PT]
 
    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]
+   RewriteRule ^/search/([^/]+)$ /cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [PT]
+
+   RewriteCond %{SCRIPT_FILENAME} "!-f"
+   RewriteCond %{SCRIPT_FILENAME} "!-d"
+   RewriteRule ^/search/(.+)/([^/]+)$ /cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$2&path=$1 [PT]
+
+   RewriteCond %{SCRIPT_FILENAME} "!-f"
+   RewriteCond %{SCRIPT_FILENAME} "!-d"
+   RewriteRule ^/(.+)/([^/]+)$ /cgi-bin/show_package.pl?searchon=names&version=all&exact=1&package=$2&path=$1 [PT]
 
 
 #  In case we need to disable the site again