[rt-users] Short URLs for Tickets and Queues
Smylers
smylers at gbdirect.co.uk
Thu Apr 11 10:43:15 EDT 2002
Odhiambo Washington wrote:
> While that was really a good one, I realized that by incorporating it
> I could not get to my stats page because that is assumed to be the
> name of a queue, yes?
Stats is an add-on that I don't use, I'm afraid -- I did check that all
of the standard 'RT' URLs contain a slash or a dot.
> http://rt-URL/Stats doesn't work like it used to before,
> so I have to go ahead and type http://rt-URL/Stats/CallsQueueDay.html
Without knowing anything about the stats package, I'm gussing that it
might work if you put a slash on the end, like so:
http://rt-URL/Stats/
If Stats is a directory, then a URL with it as the final part must end
in a slash. Most web servers are set up so that if a user misses out
the slash they will rewrite the URL to have a slash in, then return the
en-slashed URL to the browser in the Location: header (and the browser
can then request the content from the correct URL -- yes it has to be
done with two separate requests like this just because somebody didn't
type a slash).
But my queue name rewriting rule is obviously coming into affect before
your server's slash-adding rule. Among other ways of solving this, you
could put a RewriteCond in there that checks for $1 not being found on
the disk and only rewriting otherwise.
There is another problem with my code that will affect all users though.
There are links on both the search results (first, next, prev) and
ticket display (full headers, reply, comment) which are relative to the
current page. For example links that think they are in the /Ticket/
directory aren't, because the short URL doesn't have that in there.
It isn't too difficult to tweak the files to use absolute URLs, thereby
fixing this.
Smylers
--
GBdirect
http://www.gbdirect.co.uk/
More information about the rt-users
mailing list