Skip to content

Commit

Permalink
Modify some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikmanoar committed Jun 8, 2020
1 parent 47bff94 commit 9b5e190
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 41 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>

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]


</IfModule>

<Files .env>
Order allow,deny
Deny from all
</Files>
21 changes: 21 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <[email protected]>
*/

$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';

0 comments on commit 9b5e190

Please sign in to comment.