diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2014-01-09 18:37:00 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2014-01-09 18:37:00 +0100 |
commit | cf84d586a8927662fcf7d7dcd50add4d2b801723 (patch) | |
tree | 9bb5f0fc14628cbb2617637aa200187158823a05 /Bugzilla | |
parent | e117d6b88aec9301c04600842c515053f4b74a2a (diff) | |
download | bugzilla-cf84d586a8927662fcf7d7dcd50add4d2b801723.tar.gz bugzilla-cf84d586a8927662fcf7d7dcd50add4d2b801723.tar.xz |
Bug 958057 - REST API - No example of non-rewrite endpoint in POD docs, no config directions for how to create rewrite
r/a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/WebService/Server/REST.pm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm index 2216911c9..bafa84f88 100644 --- a/Bugzilla/WebService/Server/REST.pm +++ b/Bugzilla/WebService/Server/REST.pm @@ -504,11 +504,21 @@ C<Bugzilla::WebService::Server::XMLRPC|XML-RPC> interface. =head1 CONNECTING The endpoint for the REST interface is the C<rest.cgi> 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<bugzilla.yourdomain.com>, then your REST client would -access the API via: C<http://bugzilla.yourdomain.com/rest/bug/35> which -looks cleaner. +your Bugzilla installation. For example, if your Bugzilla is at +C<bugzilla.yourdomain.com>, to access the API and load a bug, +you would use C<http://bugzilla.yourdomain.com/rest.cgi/bug/35>. + +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<http://bugzilla.yourdomain.com/rest/bug/35> which is simpler to remember. + +Add this to your .htaccess file: + + <IfModule mod_rewrite.c> + RewriteEngine On + RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] + </IfModule> =head1 BROWSING |