gavinblair/xbox-achievements/master/.htaccess - Htaccess File

gavinblair/xbox-achievements/master/.htaccess

# Rewrite the new URL before anything else
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^1.0/(.*)$ /api/$1 [R=301,NE,L,QSA]
RewriteRule ^2.0/(.*)$ /api/$1 [R=301,NE,L,QSA]

# Set the proper headers and stuff
Header unset Pragma
FileETag None
Header unset ETag
ExpiresActive On
ExpiresDefault A0

<FilesMatch ".(php|cgi|pl|htm)$">
ExpiresDefault A0 
Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>

# Route to the proper handler
RewriteRule ^achievements.(json|xml)$ achievements.php?format=$1 [L,QSA] 
RewriteRule ^games.(json|xml)$ games.php?format=$1 [L,QSA] 
RewriteRule ^profile.(json|xml)$ profile.php?format=$1 [L,QSA] 
RewriteRule ^friends.(json|xml)$ friends.php?format=$1 [L,QSA]
RewriteRule ^search.(json|xml)$ search.php?format=$1 [L,QSA]

RewriteCond %{REQUEST_METHOD} !^(GET|HEAD|OPTIONS|POST|PUT)
RewriteRule .* - [F]

On Github License

Files

Download PDF of Htaccess file
GET, no-cache, POST, Pragma, PUT, REQUEST_METHOD

Comments

Apache