Previous: Redirecting to HTTPS, Up: Apache [Contents][Index]
The Traccar Client app does not provide a facility to define a URL prefix. All calls are to the server root.
A workaround is to configure the Apache server to redirect both HTTP and
HTTPS requests that match the pattern of Traccar Client logging requests
to the /trip/rest/log_point
URL prefix.
To support using the Traccar Client, enter the following in
the Apache <VirtualHost/>
sections:
# Redirect for Traccar Client <IfModule mod_rewrite.c> RewriteEngine On RewriteCond "%{QUERY_STRING}" \ "^id=[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}×tamp=\d+&lat=[-.\d]+&lon=[-.\d]+" RewriteRule ^/ /trip/rest/log_point [PT,QSA] </IfModule>