2017-02-26 179 views
1

我有一个网站开发bootstraplaravel 5.0我想上传到000webhost.com为测试目的在我的域名上去之前。我已将其上载到服务器上,但stylesheetjs文件未正确链接。外部样式表和js文件不在服务器链接

我有这个在我的实际文件

<link rel="stylesheet" href="{{asset('css/animate.css')}}"> 
<!--animate.js--> 
<link rel="stylesheet" href="{{asset('css/coreStyleSheet.css')}}"> 
<!--Font Awesome--> 
<link rel="stylesheet" href=" {{asset('icon/fontAwesome/css/font-awesome.css')}}"> 
<!--customeJS--> 
<script src="{{asset('js/coreHomePage.js')}}"></script> 
<!--fullPage.js--> 
<link rel="stylesheet" href="{{asset('fullPage/jquery.fullpage.css')}}"> 

我用{{asset('source')}}

但当000webhost的什么,当我打开正常工作的源文件,它是这样

<link rel="stylesheet" href="https://devfairtex.000webhostapp.com/server.php/css/animate.css"> 
<!--animate.js--> 
<link rel="stylesheet" href="https://devfairtex.000webhostapp.com/server.php/css/coreStyleSheet.css"> 
<!--Font Awesome--> 
<link rel="stylesheet" href=" https://devfairtex.000webhostapp.com/server.php/icon/fontAwesome/css/font-awesome.css"> 
<!--customeJS--> 
<script src="https://devfairtex.000webhostapp.com/server.php/js/coreHomePage.js"></script> 

.htaccess

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

    RewriteEngine On 

    # Redirect Trailing Slashes... 
    RewriteRule ^(.*)/$ /$1 [L,R=301] 

    # Handle Front Controller... 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule^index.php [L] 
</IfModule> 
+0

这与css或javascript标记无关。请不要发送垃圾邮件标签,只使用与特定代码问题相关的内容 – charlietfl

+0

对不起有关队友@charlietfl – Rehan

+0

您的.htaccess文件是什么样的! – Dom

回答

0

选项-MultiViews

RewriteEngine On 

# Redirect Trailing Slashes... 
RewriteRule ^(.*)/$ /$1 [L,R=301] 

# Handle Front Controller... 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule^index.php [L] 

哎从你的.htaccess文件中删除此。 :)