Robert 3 years ago
parent a80c3d1e3d
commit 4e0b10b568
  1. 63
      .htaccess
  2. 6
      cli_cron
  3. 6
      op_cache.php
  4. 6
      public/assets/js/trouble_shooting_routes.js
  5. 6
      public/main.page
  6. 7
      src/documentation/Purifier.txt
  7. 6
      src/mockup/cli_controllers/app/home_ctrl.php

@ -1,63 +0,0 @@
<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
RewriteEngine On
# LOG AND DENY ACCESS TO CORE DIRs
RewriteRule "^(src|models|views|controllers|includes|forms|templates|sql|classes|settings|uploads|notes|configs|vendor|node_modules)/(.*)$" "index.php?route=/app/home&m=deny&f=$1/$2" [NC,L]
# TRACE and TRACK HTTP methods disabled to prevent XSS attacks
RewriteCond "%{REQUEST_METHOD}" "^TRAC[EK]"
RewriteRule ".*" "-" [L,R=405]
# API
# never rewrite for existing files, directories and links
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule "^(api|api2)/([^/]*)/([^/]*)/([^/]*)/([^/]*)$" "index.php?project=$2&route=/$3/$4&m=$5&$1=true" [QSA,L]
# Mobile
RewriteCond "%{HTTP_USER_AGENT}" "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule "^([^/]*)/([^/]*)/([^/]*)/([^/]*)\.html$" "index.php?project=$1&route=/$2/$3&m=$4&mobile=true" [QSA,L]
# Site
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule "^([^/]*)/([^/]*)/([^/]*)/([^/]*)\.html$" "index.php?project=$1&route=/$2/$3&m=$4" [QSA,L]
# always send 404 on missing files in these folders
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule "^(assets|skin|js|css|public)/(.*)$" "-" [R=404,L,NS]
# Short Hand Site
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule "^([^/]*)/([^/]*)/([^/]*)/$" "index.php?project=$1&route=/$2/$3&m=index" [QSA,L]
# rewrite everything not found to index.php
RewriteCond "%{REQUEST_FILENAME}" "!-f"
RewriteCond "%{REQUEST_FILENAME}" "!-d"
RewriteCond "%{REQUEST_FILENAME}" "!-l"
RewriteRule ".*" "index.php" [L]
</IfModule>
#ErrorDocument 404 /404.php
<Files *.php>
Order allow,deny
Deny from all
</Files>
<Files .gitignore>
Order allow,deny
Deny from all
</Files>
<Files *.tpl>
Header set Content-Type "text/x-handlebars-template; charset=UTF-8"
AddCharset UTF-8 .tpl
</Files>
<Files index.php>
Order allow,deny
Allow from all
</Files>

@ -3,6 +3,12 @@
declare(strict_types=1); declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
require 'src/before_main.php'; require 'src/before_main.php';
\bs_tts\site_helper::set_all_projects(['mockup','ex','live']); \bs_tts\site_helper::set_all_projects(['mockup','ex','live']);
\bs_tts\site_helper::set_default_project("mockup"); \bs_tts\site_helper::set_default_project("mockup");

@ -2,6 +2,12 @@
declare(strict_types=1); declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
require 'src/before_main.php'; require 'src/before_main.php';
\bs_tts\site_helper::set_all_projects(['mockup']); \bs_tts\site_helper::set_all_projects(['mockup']);
\bs_tts\site_helper::set_default_project("mockup"); \bs_tts\site_helper::set_default_project("mockup");

@ -1,3 +1,9 @@
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
var Fresh = function() { var Fresh = function() {
function KeepAsset(key) { function KeepAsset(key) {
found_one = false; found_one = false;

@ -2,6 +2,12 @@
declare(strict_types=1); declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
$show_all_startup_errors = false; $show_all_startup_errors = false;
if ($show_all_startup_errors) { if ($show_all_startup_errors) {
ini_set('display_errors', 1); ini_set('display_errors', 1);

@ -1,7 +0,0 @@
The HTML Purifier Cache folder needs write access for web server:
cd /var/www/frames/tts_framework/vendor/ezyang/htmlpurifier/library
chgrp www-data HTMLPurifier/DefinitionCache/Serializer
Make sure that group has read/write/execute access via:
chmod g+rwx HTMLPurifier/DefinitionCache/Serializer

@ -2,6 +2,12 @@
declare(strict_types=1); declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace prj\mockup\cli_controllers\app; namespace prj\mockup\cli_controllers\app;
class home_ctrl { class home_ctrl {

Loading…
Cancel
Save