Squid custom error pages and javascript/css url sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Squid custom error pages and javascript/css url sources

Vieri
Hi,

I've created custom error pages with something like this in the header tag:

<head>
<link rel="stylesheet" href="<a href="http://%h/common/jquery.mobile-1.4.5.min.css">http://%h/common/jquery.mobile-1.4.5.min.css">
<script src="<a href="http://%h/common/jquery-1.11.3.min.js">http://%h/common/jquery-1.11.3.min.js"></script>
<script src="<a href="http://%h/common/jquery.mobile-1.4.5.min.js">http://%h/common/jquery.mobile-1.4.5.min.js"></script>

The page displays fine when the client requested an http site.
However, for https sites the css and js files do not load.

What alternatives do I have? Should I always redirect with deny_info instead? Is there a "catch-all" for deny_info?

Thanks,

Vieri
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid custom error pages and javascript/css url sources

Eliezer Croitoru
By this:
https://www.paulirish.com/2010/the-protocol-relative-url/

This should work:
<head>
<link rel="stylesheet" href="//%h/common/jquery.mobile-1.4.5.min.css">
<script src="//%h/common/jquery-1.11.3.min.js"></script>
<script src="//%h/common/jquery.mobile-1.4.5.min.js"></script>

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]



-----Original Message-----
From: squid-users [mailto:[hidden email]] On Behalf Of Vieri
Sent: Wednesday, August 16, 2017 13:25
To: [hidden email]
Subject: [squid-users] Squid custom error pages and javascript/css url sources

Hi,

I've created custom error pages with something like this in the header tag:

<head>
<link rel="stylesheet" href="<a href="http://%h/common/jquery.mobile-1.4.5.min.css">http://%h/common/jquery.mobile-1.4.5.min.css">
<script src="<a href="http://%h/common/jquery-1.11.3.min.js">http://%h/common/jquery-1.11.3.min.js"></script>
<script src="<a href="http://%h/common/jquery.mobile-1.4.5.min.js">http://%h/common/jquery.mobile-1.4.5.min.js"></script>

The page displays fine when the client requested an http site.
However, for https sites the css and js files do not load.

What alternatives do I have? Should I always redirect with deny_info instead? Is there a "catch-all" for deny_info?

Thanks,

Vieri
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Squid custom error pages and javascript/css url sources

Vieri

________________________________
From: Eliezer Croitoru <[hidden email]>

>
> //%h/

It works great. Thanks Eliezer.

Vieri
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users