Handle details of unknown apps
[stouyapi.git] / www / .htaccess
index 0396ea8..8a4bbaf 100644 (file)
@@ -2,7 +2,11 @@ RewriteEngine on
 
 #rewrite details GET parameter
 RewriteCond %{QUERY_STRING} ^app=([^&]+)
-RewriteRule ^api/v1/details /api/v1/details-data/%1.json?
+RewriteCond %{DOCUMENT_ROOT}/api/v1/details-data/%1.json -f
+RewriteRule ^api/v1/details /api/v1/details-data/%1.json? [END]
+
+# details for unknown apps. Also see .htaccess in the dummy dir
+RewriteRule ^api/v1/details /api/v1/details-dummy/404? [END]
 
 RewriteRule ^api/v1/apps/(.*)/download$ /api/v1/apps/$1-download.json? [END]
 RewriteRule ^api/v1/apps/(.*)$ /api/v1/apps/$1.json? [END]