[rt-devel] RT Apache "hack" - updated version
Michael Brown
mbrown at fensystems.co.uk
Wed Jan 15 08:04:16 EST 2003
In reference to "Short URLs to retrieve Ticket numbers and Queues" on the
"Extending RT" page of the "RT Hackers Guide":
> The additions needed to your RT's VirtualHost configuration are:
> RewriteEngine On
> # Treat a single number as a ticket number:
> RewriteRule ^/([0-9]+)$ /Ticket/Display.html?id=$1 [L]
> # Treat anything else that doesn't look like a file or directory as
> # a queue name:
> RewriteRule ^/([^/.]+)$ /Search/Listing.html?ShowQueue=$1 [L]
These instructions are out of date and do not work properly with the
current version of RT (2.0.15, as far as I am aware).
Here is the .htaccess file that I am using successfully at the moment,
which achieves much the same results:
RewriteEngine On
# Treat a single number as a ticket number:
RewriteRule ^([0-9]+)$ /rt/Ticket/Display.html?id=$1 [L,R]
# "new" is an alias for "search for new, unowned tickets"
RewriteRule ^new$ /rt/Search/Listing.html?NewSearch=1&TicketsSortBy=Status&TicketsSortOrder=ASC&StatusOp==&ValueOfStatus=new&OwnerOp==&ValueOfOwner=Nobody [L,R]
# Treat anything else that doesn't look like a file or directory as
# a queue name:
RewriteRule ^([^/.]+)$ /rt/Search/Listing.html?NewSearch=1&TicketsSortBy=Status&TicketsSortOrder=ASC&QueueOp==&ValueOfQueue=$1 [L,R]
I presume that Search/Listing.html no longer accepts ShowQueue as an
argument; certainly it did not seem to do anything. In addition, it was
necessary to use the [R] flag to avoid breaking some of the relative links
on the pages.
The "new" alias is just an extra that I find handy.
Please cc me on any replies; I am not a list member. Many thanks to all
who have put together RT - we've been using it for three days now and it's
boosted our productivity to unrecognisable levels. Congratulations on a
great piece of software!
Michael Brown
Fen Systems Ltd.
More information about the Rt-devel
mailing list