>From 74f5fd4b4df031b3f93c616238f822159c378706 Mon Sep 17 00:00:00 2001 From: Viktor Leonhardt Date: Sun, 7 Mar 2010 20:03:20 +0100 Subject: [PATCH] Changed some URL's and used mod_rewrite to make them look nicer. I left the search function of packages. --- web/html/.htaccess | 21 +++++++++++++++++++++ web/template/header.php | 17 +++++++++-------- web/template/pkg_search_form.php | 2 +- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100755 web/html/.htaccess diff --git a/web/html/.htaccess b/web/html/.htaccess new file mode 100755 index 0000000..289322a --- /dev/null +++ b/web/html/.htaccess @@ -0,0 +1,21 @@ +RewriteEngine on + +RewriteBase / + +# if its not a file do: +# if there is no slash at the end do: +# replace the whole URL and set it into slashes + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_URI} !(.*)/$ +RewriteRule ^(.*)$ /$1/ [R=301] + +RewriteRule ^$ index.php + +RewriteRule ^(account|packages|pkgsubmit|logout)/$ /$1.php +RewriteRule ^trusteduser/$ /tu.php + +RewriteRule ^(account|packages|pkgsubmit|trusteduser)/setlang-([a-z][_a-zA-Z]+)/$ /$1.php?setlang=$2 +RewriteRule ^setlang-([a-z][_a-zA-Z]+)/$ /index.php?setlang=$1 + +RewriteRule ^packages/(.*)/$ /packages.php?SeB=m&K=$1 \ No newline at end of file diff --git a/web/template/header.php b/web/template/header.php index 3f8cff1..d1d3c30 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -5,6 +5,7 @@ xml:lang=""> AUR (<?php print $LANG; ?>)<?php if ($title != "") { print " - " . $title; } ?> + @@ -21,13 +22,13 @@ Forums Wiki Bugs - AUR + AUR Download -- 1.7.0.1