Fixes for shared hosting

This commit is contained in:
Nabeel Shahzad
2017-12-23 10:15:18 -06:00
parent 07bcc5f199
commit f59d372f2b
4 changed files with 17 additions and 21 deletions
+11 -19
View File
@@ -18,25 +18,17 @@ Options -Indexes
Deny from all Deny from all
</Files> </Files>
<IfModule mod_rewrite.c> RewriteEngine On
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
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... # Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Front Controller... # Handle Authorization Header
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP:Authorization} .
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^ index.php [L]
#RewriteRule ^(.*)$ public/$1 [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
+4
View File
@@ -23,6 +23,10 @@ if (!function_exists('public_asset')) {
function public_asset($path, $parameters = [], $secure = null) function public_asset($path, $parameters = [], $secure = null)
{ {
$publicBaseUrl = app()->publicUrlPath(); $publicBaseUrl = app()->publicUrlPath();
if($path[0] !== '/') {
$path = '/'.$path;
}
$path = $publicBaseUrl . $path; $path = $publicBaseUrl . $path;
return url($path, $parameters, $secure); return url($path, $parameters, $secure);
+1 -1
View File
@@ -9,7 +9,7 @@
<div class="sidebar-wrapper"> <div class="sidebar-wrapper">
<div class="logo" style="background: #067ec1; margin: 0px; text-align: center; min-height: 74px;"> <div class="logo" style="background: #067ec1; margin: 0px; text-align: center; min-height: 74px;">
<a href="{!! url('/dashboard') !!}"> <a href="{!! url('/dashboard') !!}">
<img src="/assets/admin/img/logo_blue_bg.svg" width="110px" style=""> <img src="{!! public_asset('/assets/admin/img/logo_blue_bg.svg') !!}" width="110px" style="">
</a> </a>
</div> </div>
@@ -60,7 +60,7 @@
</button> </button>
<p class="navbar-brand text-white" data-placement="bottom" target="_blank"> <p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{!! url('/') !!}"> <a href="{!! url('/') !!}">
<img src="/assets/frontend/img/logo_blue_bg.svg" width="135px" style=""/> <img src="{!! public_asset('assets/frontend/img/logo_blue_bg.svg') !!}" width="135px" style=""/>
</a> </a>
</p> </p>
</div> </div>