Receiving a 502 Bad Gateway error when attempting to request a CSS file via HTTPS

After recently adding SSL to some pages on my website, I encountered an issue when trying to call a secured web page

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="https://www.myDomain.com/test/Style/Secure/en/BodyStyle.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Test Https
    </div>
    </form>
</body>
</html>

When calling the page, the CSS displayed a response that indicated the SSL settings on the Test folder were set to Accept in the IIS 7.

How can I resolve this issue and ensure the CSS file is called over https normally?

Answer №1

It is recommended to call your CSS by using the following code:

<link href="./test/Style/Secure/en/BodyStyle.css" rel="stylesheet" />

When using HTTPS, the CSS is bound to your entire domain name. If you want to keep your CSS hidden from the public, it is not possible when importing it through HTML. Browsers require this file to properly render your HTML designs.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to fix a div at the top, while anchoring the content at the bottom of the div?

Currently, I am using Pandoc to convert files to PDF and incorporating HTML/CSS for document styling, specifically for printing purposes rather than for screen display. My objective is to replicate the "header" of a Word document. To achieve this, I have ...

Javascript adds a comma after every postback event

This particular JavaScript code I am incorporating helps in expanding and collapsing nested grid views. <script type="text/javascript"> $("[src*=plus]").live("click", function () { $(this).closest("tr").after("<tr><td></td ...

How can I resolve the issue with the HTML/CSS footer not functioning properly on Safari for iPhone in my mobile site?

Struggling with a mobile website issue here. The client wants text-based buttons/links at the bottom, so I added them in, but my skills with size percentages are a bit rusty. I need these buttons to line up horizontally and adjust their width accordingly ...

It is not possible to highlight the text that appears in the title of the tooltip in React MUI

Within my react application, there is a component that utilizes the code snippet below: <FormControlLabel labelPlacement="top" control={ comp?.manualInput ? ( <TextField name="price" type= ...

Aligning content within a div block

I created a div block that houses a form structured like this: <div class="divClass"> <form id="frm" method="post" action="/NotDefinedYet/index.xhtml" class="frmClass"> <input type="text" name="j_idt9:j_idt10:Username" placehold ...

Using Kendo UI Mobile, take advantage of a button to trigger the click action of another

Consider the following situation: HTML <a id="mButton" data-role="button" data-click="clickFn">myButton</a> <asp:ImageButton runat="server" ID="aspButton" style="display: none"></asp:ImageButton> SCRIPT function clickFn(e) { ...

Search Bar on the Website for Google Search

I am currently working on a basic website and I'm looking to incorporate Google Search functionality into it. I've managed to create a simple search box that redirects users to the Google Search Results page when they input their query. However, ...

Can you tell me why one of these Sass codes is throwing an invalid CSS error while the other is not?

My code: @for $j from 1 to 6 { .text-#($j) { font-size: 15px * $j; } } I'm facing an issue where my code doesn't run as expected. In an attempt to fix this, I modified it to use a 'through' keyword instead of 'to' in the loop ...

Enhance your webpage with a stunning background video

I'm trying to add a background video that covers the entire screen but maintains a height of 400px, similar to the one shown here. Is there a way to achieve this without using JavaScript? Below is the HTML code I currently have: <div class="pr ...

Difficulty with Horizontal Mousewheel Scrolling

Struggling to implement a horizontal scrolling feature (via mousewheel) for both containers in the code below. I want this feature to be easily applied to any future container creations as well. <body> <style> #container { display: flex ...

Ways to prevent a floated element from impacting text-align: center styling?

Within my code, there is a <p> element structured as follows: <div><p>Text Goes Here <span></span</p></div> The CSS I currently have is: div { text-align:center } span { float:right } An issue arises when I populate ...

Is it possible to change the background color using jQuery?

Can you assist me with this: I have a website and I am looking to modify the bg-coler when hovering over the menu (similar to how it works on the rhcp-website). I attempted using jquery for this, but unfortunately, it did not yield the desired result.. ( ...

Adaptive Table Layout that Creates a Page-breaking Design

I have a page layout with three columns: a fixed-width left-hand navigation, a responsive content column, and a fixed-width right-hand navigation. The issue arises when the content in the middle column includes HTML tables that sometimes exceed the availab ...

Are there any other methods of using HREF in an <asp:Button> besides OnClientClick for invoking an inline div?

I decided to create a concealed <div> on the same page and tried calling it with href="#", which worked perfectly. However, when I attempted to use the same code in ASP.net, I encountered some issues with Javascript or other factors that prevented it ...

The jQuery menu is malfunctioning in Internet Explorer due to the Document Mode being set to Quirks

I am encountering an issue where the below code is not functioning properly in Internet Explorer's document mode quirks. Each time I hover over the submenu, its length doubles unexpectedly. Can someone please provide assistance with this matter? < ...

What is the process for creating a unit test project along with a new project in Visual Web Dev Express?

Referenced from http://msdn.microsoft.com/en-us/library/dd410597(VS.100).aspx ... In cases where the Standard or Express editions of Visual Studio are being used, the Create Unit Test Project dialog box will not be shown. Instead, the new MVC applicatio ...

The XSD schema error indicates that there was invalid content found starting with an element, and no child element was expected at this point

While working on creating a schema for an input XML file, my main requirement was to make either ParcelNumber or WorkArea mandatory. Here is the input XML I was working with: <?xml version="1.0" encoding="utf-8"?> <NOCPlantMapRequest xmlns:xsi="h ...

Showing the overflow scroll bar on both iOS and Android mobile devices

Is it possible to make the overflow scrollbar visible on mobile devices, specifically iPhones, Samsungs, and Safari browsers? The scrollbar is currently visible on desktops but not on mobile devices. I need a solution for this issue. Here is the current c ...

Optimize your bootstrap carousel for mobile viewing by ensuring that the image and text are

My bootstrap carousel is displaying perfectly on desktop screens with images sized at 1200x400. However, when viewed on mobile devices, the images shrink so much that the text on them becomes unreadable. Additionally, the navigation dots at the bottom of t ...

Ways to make an area map more transparent

I'm encountering an issue with HTML opacity... Currently, I've implemented opacity using CSS but it's not functioning correctly. Below is my HTML and CSS code: <area shape ="rect" class="transbox" coords ="0,0,30,22" href ="test1.htm" ...