fix(rewrite): simplify index.php content to emulate rewrite

feat/use-default-theme
dufraissejeremy 2 years ago
parent 0e609f7d10
commit 4c37172f60
  1. 4
      content/index.php
  2. 4
      content/sub/index.php
  3. 4
      content/sub/page/index.php
  4. 4
      content/theme/index.php
  5. 2
      sites/default/index.php
  6. 8
      sites/default/sub/index.php
  7. 8
      sites/default/sub/page/index.php
  8. 8
      sites/default/theme/index.php

@ -5,8 +5,4 @@
* Authors: see /README.md * Authors: see /README.md
*/ */
chdir(dirname(__DIR__,1)); chdir(dirname(__DIR__,1));
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 1;
$_SERVER['SCRIPT_NAME'] = dirname($_SERVER['SCRIPT_NAME'],1).'/index.php';
$_SERVER['QUERY_STRING'] = '&' . ($_SERVER['QUERY_STRING'] ?? '') ;
$_SERVER['PICO_URL_REWRITING'] = true;
include 'index.php'; include 'index.php';

@ -5,8 +5,4 @@
* Authors: see /README.md * Authors: see /README.md
*/ */
chdir(dirname(__DIR__,2)); chdir(dirname(__DIR__,2));
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 1;
$_SERVER['SCRIPT_NAME'] = dirname($_SERVER['SCRIPT_NAME'],2).'/index.php';
$_SERVER['QUERY_STRING'] = 'sub&' . ($_SERVER['QUERY_STRING'] ?? '') ;
$_SERVER['PICO_URL_REWRITING'] = true;
include 'index.php'; include 'index.php';

@ -5,8 +5,4 @@
* Authors: see /README.md * Authors: see /README.md
*/ */
chdir(dirname(__DIR__,3)); chdir(dirname(__DIR__,3));
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 1;
$_SERVER['SCRIPT_NAME'] = dirname($_SERVER['SCRIPT_NAME'],3).'/index.php';
$_SERVER['QUERY_STRING'] = 'page&' . ($_SERVER['QUERY_STRING'] ?? '') ;
$_SERVER['PICO_URL_REWRITING'] = true;
include 'index.php'; include 'index.php';

@ -5,8 +5,4 @@
* Authors: see /README.md * Authors: see /README.md
*/ */
chdir(dirname(__DIR__,2)); chdir(dirname(__DIR__,2));
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 1;
$_SERVER['SCRIPT_NAME'] = dirname($_SERVER['SCRIPT_NAME'],2).'/index.php';
$_SERVER['QUERY_STRING'] = 'theme&' . ($_SERVER['QUERY_STRING'] ?? '') ;
$_SERVER['PICO_URL_REWRITING'] = true;
include 'index.php'; include 'index.php';

@ -6,8 +6,6 @@
*/ */
chdir(dirname(__DIR__,2)); chdir(dirname(__DIR__,2));
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 2;
if (is_file('vendor/autoload.php')) { if (is_file('vendor/autoload.php')) {
include_once('vendor/autoload.php'); include_once('vendor/autoload.php');
} }

@ -0,0 +1,8 @@
<?php
/**
* SPDX-License-Identifier: EUPL-1.2
* Authors: see /README.md
*/
chdir(dirname(__DIR__));
include 'index.php';

@ -0,0 +1,8 @@
<?php
/**
* SPDX-License-Identifier: EUPL-1.2
* Authors: see /README.md
*/
chdir(dirname(__DIR__,1));
include 'index.php';

@ -0,0 +1,8 @@
<?php
/**
* SPDX-License-Identifier: EUPL-1.2
* Authors: see /README.md
*/
chdir(dirname(__DIR__));
include 'index.php';
Loading…
Cancel
Save