iRail/iRail/master/api/.htaccess
#
# iRail.be .htaccess file
#
# by Yeri 'Tuinslak' Tiete (yeri.be)
#
# move to the API folder
#
Options -Indexes
Options +FollowSymLinks
AddType application/vnd.google-earth.kml+xml .kml
AddDefaultCharset UTF-8
#Header add Access-Control-Allow-Origin "*"
#Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
#Header add Access-Control-Allow-Methods "GET, HEAD"
# mod rewrite, I like sexy looking URLs
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# API => api.domain
RewriteRule ^connections/?$ connections.php [NC,L]
RewriteRule ^stations/?$ stations.php [NC,L]
RewriteRule ^liveboard/?$ liveboard.php [NC,L]
RewriteRule ^vehicle/?$ vehicle.php [NC,L]
RewriteRule ^feedback/occupancy/?$ feedback/occupancy.php [NC,L]
# Linked Data terms
RewriteRule ^terms/unknown$ terms/unknown.html [R=303]
RewriteRule ^terms/low$ terms/low.html [R=303]
RewriteRule ^terms/medium$ terms/medium.html [R=303]
RewriteRule ^terms/high$ terms/high.html [R=303]
# Logs
RewriteRule ^logs/?$ logs.php [NC,L]
</IfModule>
On Github License
Files