aces/Loris/17.0-dev/htdocs/api/v0.0.1/.htaccess - Htaccess File

aces/Loris/17.0-dev/htdocs/api/v0.0.1/.htaccess

Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "*"
RewriteEngine on
Options -Indexes

# pass-through if another rewrite rule has been applied already
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

RewriteRule ^login Login.php?PrintLogin=true [L]
# Projects API rewrite rules
RewriteRule ^projects/([a-zA-Z0-9_ws.]+)/instruments/([a-zA-Z0-9_.]+)$ projects/InstrumentForm.php?Instrument=$2&PrintInstrumentForm=true [L]
RewriteRule ^projects/([a-zA-Z0-9_ws.]+)/visits(/*)$ projects/Project.php?Project=$1&Visits=true&PrintProjectJSON=true [L]
RewriteRule ^projects/([a-zA-Z0-9_ws.]+)/candidates(/*)$ projects/Project.php?Project=$1&Candidates=true&PrintProjectJSON=true [L]
RewriteRule ^projects/([a-zA-Z0-9_ws.]+)/instruments(/*)$ projects/Project.php?Project=$1&Instruments=true&PrintProjectJSON=true&InstrumentDetails=true [L]
RewriteRule ^projects/([a-zA-Z0-9_ws.]+)(/*)$ projects/Project.php?Project=$1&Instruments=true&Visits=true&Candidates=true&PrintProjectJSON=true [L]

RewriteRule ^projects(/*)$ Projects.php?PrintProjects=true [L]

# Candidates API rewrite rules

RewriteRule ^candidates(/*)$ Candidates.php?PrintCandidates=true [L]
RewriteRule ^candidates/([0-9]+)(/*)$ candidates/Candidate.php?CandID=$1&PrintCandidate=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)(/*)$ candidates/Visit.php?CandID=$1&VisitLabel=$2&PrintVisit=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)/instruments$ candidates/Instruments.php?CandID=$1&VisitLabel=$2&NoCandidate=true&PrintInstruments=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)/instruments/([a-zA-Z0-9_.]+)$ candidates/InstrumentData.php?Instrument=$3&Visit=$2&CandID=$1&PrintInstrumentData=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)/instruments/([a-zA-Z0-9_.]+)/dde$ candidates/InstrumentData.php?Instrument=$3&Visit=$2&CandID=$1&DDE=true&PrintInstrumentData=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)/instruments/([a-zA-Z0-9_.]+)/flags$ candidates/InstrumentData.php?Instrument=$3&Visit=$2&CandID=$1&flags=true&PrintInstrumentData=true [L]
RewriteRule ^candidates/([0-9]+)/([a-zA-Z0-9_.]+)/instruments/([a-zA-Z0-9_.]+)/dde/flags$ candidates/InstrumentData.php?Instrument=$3&Visit=$2&CandID=$1&DDE=true&flags=true&PrintInstrumentData=true [L]

On Github License

Files

Download PDF of Htaccess file
ENV, REDIRECT_STATUS

Comments

Apache