generated from SeaCMS/modele-depot
fix(Rewrite): first step to emulate it
This commit is contained in:
parent
1428bc882f
commit
ab24951341
@ -5,7 +5,6 @@
|
||||
site_title: Pico # The title of your website
|
||||
base_url: ~ # Pico will try to guess its base URL, if this fails, override it here;
|
||||
# Example: https://example.com/pico/
|
||||
rewrite_url: false # A boolean (true or false) indicating whether URL rewriting is forced
|
||||
debug: ~ # Set this to true to enable Pico's debug mode
|
||||
timezone: ~ # Your PHP installation might require you to manually specify a timezone
|
||||
locale: ~ # Your PHP installation might require you to manually specify a locale to use
|
||||
|
12
content/index.php
Normal file
12
content/index.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SPDX-License-Identifier: EUPL-1.2
|
||||
* Authors: see /README.md
|
||||
*/
|
||||
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';
|
12
content/sub/index.php
Normal file
12
content/sub/index.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SPDX-License-Identifier: EUPL-1.2
|
||||
* Authors: see /README.md
|
||||
*/
|
||||
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';
|
12
content/sub/page/index.php
Normal file
12
content/sub/page/index.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SPDX-License-Identifier: EUPL-1.2
|
||||
* Authors: see /README.md
|
||||
*/
|
||||
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';
|
12
content/theme/index.php
Normal file
12
content/theme/index.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SPDX-License-Identifier: EUPL-1.2
|
||||
* Authors: see /README.md
|
||||
*/
|
||||
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';
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
chdir(dirname(__DIR__,2));
|
||||
$GLOBALS['PicoVendorsDirectoryRelativeLevels'] = 2;
|
||||
|
||||
if (is_file('vendor/autoload.php')) {
|
||||
include_once('vendor/autoload.php');
|
||||
|
Loading…
x
Reference in New Issue
Block a user