From 479ccdf3ee5ea32f17ec6b81ffdad9cdfab94bd2 Mon Sep 17 00:00:00 2001 From: "bzrmirror%bugzilla.org" Date: Thu, 9 Jan 2014 17:45:42 +0000 Subject: [PATCH] Bug 958057 - REST API - No example of non-rewrite endpoint in POD docs, no config directions for how to create rewrite r/a=justdave git-svn-id: svn://10.0.0.236/trunk@265175 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- .../Bugzilla/WebService/Server/REST.pm | 20 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 69431124bc0..c8b689a90c1 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -8859 \ No newline at end of file +8860 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/REST.pm b/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/REST.pm index 2216911c906..bafa84f88d5 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/REST.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/WebService/Server/REST.pm @@ -504,11 +504,21 @@ C interface. =head1 CONNECTING The endpoint for the REST interface is the C script in -your Bugzilla installation. If using Apache and mod_rewrite is installed -and enabled, you can also use /rest/ as your endpoint. For example, if your -Bugzilla is at C, then your REST client would -access the API via: C which -looks cleaner. +your Bugzilla installation. For example, if your Bugzilla is at +C, to access the API and load a bug, +you would use C. + +If using Apache and mod_rewrite is installed and enabled, you can +simplify the endpoint by changing /rest.cgi/ to something like /rest/ +or something similar. So the same example from above would be: +C which is simpler to remember. + +Add this to your .htaccess file: + + + RewriteEngine On + RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] + =head1 BROWSING