From 9b5e190d62e34eed2d7f2438c5f59b50cc7752e8 Mon Sep 17 00:00:00 2001 From: tarikmanoar Date: Tue, 9 Jun 2020 05:53:53 +0600 Subject: [PATCH] Modify some changes --- .gitignore | 1 + .htaccess | 41 +++++++++++++++++++++++++++++++++++++++++ index.php | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .htaccess create mode 100644 index.php diff --git a/.gitignore b/.gitignore index 10377ee..4c56d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ yarn-error.log !/resources/views/auth/old_emp-reg.blade.php !/resources/views/auth/old_register.blade.php !/resources/views/jobs/old_show.blade.php +*.zip diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..846ba63 --- /dev/null +++ b/.htaccess @@ -0,0 +1,41 @@ + + + + Options -MultiViews -Indexes + + + RewriteEngine On + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} (.+)/$ + RewriteRule ^ %1 [L,R=301] + +#RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.woff|\.woff2|\.jpg|\.gif|robots\.txt)$ [NC] + RewriteCond %{REQUEST_URI} !(\.svg|\.ico|\.woff|\.woff2|\.ttf|\.css|\.js|\.png|\.jpg|\.gif|\.pdf|\.jpeg|\.docx|robots\.txt)$ [NC] + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_URI} !^/public/ + RewriteRule ^(avatar|css|external|images|js)/(.*)$ public/$1/$2 [L,NC] + + + # Handle Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + + + + + + Order allow,deny + Deny from all + diff --git a/index.php b/index.php new file mode 100644 index 0000000..5fb6379 --- /dev/null +++ b/index.php @@ -0,0 +1,21 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { + return false; +} + +require_once __DIR__.'/public/index.php';