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

View File

@@ -18,25 +18,17 @@ Options -Indexes
Deny from all
</Files>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
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}]
</IfModule>
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

View File

@@ -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);

View File

@@ -9,7 +9,7 @@
<div class="sidebar-wrapper">
<div class="logo" style="background: #067ec1; margin: 0px; text-align: center; min-height: 74px;">
<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>
</div>

View File

@@ -60,7 +60,7 @@
</button>
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<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>
</p>
</div>