<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin: *
</IfModule>
<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteRule    ^$ view/    [NC,L]
    RewriteRule    ^ping/([0-9]+)/?$ view/ping.php?id=$1    [NC,L]
    RewriteRule    ^login$ objects/login.json.php    [NC,L]
    RewriteRule    ^logoff$ objects/logoff.json.php    [NC,L]
    RewriteRule    ^encoders.json$ view/encoders.json.php    [NC,L]
    RewriteRule    ^status$ view/status.php    [NC,L]
    

</IfModule>