commit f59a303fd8ddcf9cf1ccf751d905157da639249a
parent 0574fd6f1433ecb08ff91b7faf284708364e2a90
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 3 Feb 2015 12:16:46 +0100
try to workaround the Api problems
Diffstat:
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.htaccess b/.htaccess
@@ -4,5 +4,5 @@ RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /^([^\.]+)$ %{REQUEST_URI}.php [NC]
Redirect 301 /oauth2callback /core/backend/admin/modules/modul_g-plus-login/handle.php
-RewriteRule api/v1/(.*)$ /core/api/v1/api.php [QSA,L]
+RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]
</IfModule>
\ No newline at end of file
diff --git a/api.php b/api.php
@@ -0,0 +1,19 @@
+<?php
+header("Cache-Control: no-cache, must-revalidate, no-store");
+//$root = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
+echo $root;
+$check = !file_exists('core/config/connect.db.inc.php');
+echo $check;
+if (!file_exists('core/config/connect.db.inc.php')) {
+ header("HTTP/1.1 301 Moved Permanently");
+ header("Location:".$root."install/index.php");
+ }else{
+ $request = $_SERVER['REQUEST_URI'];
+ if (($pos = strpos($request, "v1/")) !== FALSE) {
+ $Api = substr($data, $pos+1);
+ }
+ header("HTTP/1.1 301 Moved Permanently");
+ header("Location:api/v1/api.php/$Api");
+ }
+
+?>
+\ No newline at end of file