From 352f239feacfe15f9eb54fc2f1c3c060a0b88a8f Mon Sep 17 00:00:00 2001 From: root <root@localhost.localdomain> Date: Sat, 14 Jan 2023 03:47:30 -0500 Subject: [PATCH] Final update --- .gitignore | 3 +++ .htaccess | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 .htaccess diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0925d11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +tmp +robpress.tar.gz +*.log diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..ffc14ea --- /dev/null +++ b/.htaccess @@ -0,0 +1,24 @@ +# Enable rewrite engine and route requests to framework +RewriteEngine On + +RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ +RewriteRule ^(.*)$ - [E=BASE:%1] + +RewriteCond %{REQUEST_URI} \.ini$ +RewriteRule \.ini$ - [R=404] +<FilesMatch "\.(ini|cfg|csv|bak|swp|swo|log|sql|sh|json|gitignore)$"> + RewriteRule .* - [R=404,L] +</FilesMatch> + +RewriteCond %{REQUEST_FILENAME} setup\.php$ +RewriteRule .* - [R=404,L] +RewriteCond %{REQUEST_FILENAME} functions\.php$ +RewriteRule .* - [R=404,L] +RewriteCond %{REQUEST_FILENAME} bootstrap\.php$ +RewriteRule .* - [R=404,L] + +RewriteCond %{REQUEST_FILENAME} !-l +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule .* %{ENV:BASE}/index.php [L,QSA] +RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] -- GitLab