From: Dave Lawrence Date: Thu, 9 Jan 2014 17:37:00 +0000 (-0500) Subject: Bug 958057 - REST API - No example of non-rewrite endpoint in POD docs, no config... X-Git-Tag: bugzilla-4.5.2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf84d586a8927662fcf7d7dcd50add4d2b801723;p=thirdparty%2Fbugzilla.git Bug 958057 - REST API - No example of non-rewrite endpoint in POD docs, no config directions for how to create rewrite r/a=justdave --- diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm index 2216911c90..bafa84f88d 100644 --- a/Bugzilla/WebService/Server/REST.pm +++ b/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