diff --git a/.htaccess b/.htaccess index d808e49a..df8233ed 100755 --- a/.htaccess +++ b/.htaccess @@ -18,25 +18,17 @@ Options -Indexes Deny from all - - - Options -MultiViews - +RewriteEngine On - RewriteEngine On +# Redirect Trailing Slashes If Not A Folder... +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)/$ /$1 [L,R=301] - # Redirect Trailing Slashes If Not A Folder... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)/$ /$1 [L,R=301] +# Handle Front Controller... +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^ index.php [L] - # Handle Front Controller... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - - #RewriteRule ^(.*)$ public/$1 [L] - - # Handle Authorization Header - RewriteCond %{HTTP:Authorization} . - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - +# Handle Authorization Header +RewriteCond %{HTTP:Authorization} . +RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] diff --git a/app/helpers.php b/app/helpers.php index 042b1dd6..192e83c3 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -23,6 +23,10 @@ if (!function_exists('public_asset')) { function public_asset($path, $parameters = [], $secure = null) { $publicBaseUrl = app()->publicUrlPath(); + if($path[0] !== '/') { + $path = '/'.$path; + } + $path = $publicBaseUrl . $path; return url($path, $parameters, $secure); diff --git a/resources/views/admin/sidebar.blade.php b/resources/views/admin/sidebar.blade.php index 56bb2105..75714e18 100644 --- a/resources/views/admin/sidebar.blade.php +++ b/resources/views/admin/sidebar.blade.php @@ -9,7 +9,7 @@