Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140817

CSS and JS is not loading in subdomain

$
0
0

I am trying to load CSS and JS files from a subdomain.

The url of my subdomain is https://example.example.com

I an trying to load the stylesheets with the following statement:

<link rel="stylesheet" type="text/css" href="https://www.example.com/vendors/bootstrap/css/bootstrap.min.css">

When I navigate to https://example.example.com I can see that the stylesheet is not loaded.

When I look at my webconsole I see the following error message:

GET https://www.example.com/vendors/bootstrap/css/bootstrap.min.css net::ERR_ABORTED 404 (Not Found)

According to the message the file should not available. But when I click on the link I can see the content of bootstrap.min.css. So my conclusion is the that the stylesheet does exist.

I also tried to upload the stylesheet to the page for the subdomain. I tried the following statements:

<link rel="stylesheet" type="text/css" href="https://example.example.com/vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://www.example.com/example/vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../vendors/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../vendors/bootstrap/css/bootstrap.min.css">

All of these returned the same error code.

When I navigate to https://www.example.com/example instead of https://example.example.com I can see that the stylesheet is working.

Does someone know how I can solve this problem?


Viewing all articles
Browse latest Browse all 140817

Latest Images

Trending Articles



Latest Images