# Login forms are not displaying after changing http to https

**URL:** <https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538>\
**Category:** Technical Forums\
**Tags:** availability, performance, tmsh, tmos, big-ip-access-policy-manager-apm, security, application-delivery\
**Created:** [October 14, 2015, 4:17pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538 "2015-10-14T16:17:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinshu](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@Jinshu](https://community.f5.com/u/Jinshu)\
**Post date:** [October 14, 2015, 4:17pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/1 "2015-10-14T16:17:46Z")

</div>

Hi All,

I am trying to configure https on my vip and seems login forms are not displaying on changing to vip port to https. If it is http, it works perfectly.

```tcl
Not working:
VIP: remote.local:443
Pool: 10.12.14.1:8080, 10.12.14.2:8080

working:
    VIP: remote.local:80
    Pool: 10.12.14.1:8080, 10.12.14.2:8080

```

Anybody faced same problem? Any solutions, suggestions??

-Jinshu

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [October 14, 2015, 4:44pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/2 "2015-10-14T16:44:37Z")

</div>

Just spitballing, but do you have a client SSL profile applied to the 443 VIP?

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [October 14, 2015, 5:07pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/3 "2015-10-14T17:07:08Z")

</div>

Is the client SSL working?

Where does it fail?

Do you see traffic on the server side of the F5?

How does it fail? Do you see some of the content, or nothing at all?

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [October 14, 2015, 6:36pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/4 "2015-10-14T18:36:57Z")

</div>

Okay, so if you’re seeing _some_ content, there’s a very good chance that you’re experiencing what I call “the proxy effect”. Basically, an HTTP request is generally a method (GET, POST), a URL path, and then a bunch of headers. An HTTP response is a status (200 OK), some headers, and then some payload. Inside that payload, and in some cases inside headers, URLs are either presented as relative (ex. /images/mycat.png) or absolute (ex. [http://test.domain.com/images/mycat.png).](http://test.domain.com/images/mycat.png)) Since you’re virtualizing the application with a proxy server, and in this case actually changing the scheme, there’s a very real possibility that the server isn’t aware of this and is presenting absolute URLs to the client that reflect what it _thinks_ is the correct address. In other words, if it worked with HTTP but now fails partially with HTTPS, there’s a very good chance that the HTML content the client is receiving contains URL references to HTTP:// content, which are now not accessible. The VERY BEST way to troubleshoot this is to first understand what’s breaking. And to do that you need a client side capture utility like Fiddler or HTTPWatch to observe the HTTP traffic from the client’s perspective. If in the capture you see the browser try (and fail) to access an HTTP:// resource, it’s a fair bet that some previous response contained that bad URL. If you know where it’s coming from, you’ll be able to effectively fix it with an iRule.

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [October 14, 2015, 7:03pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/5 "2015-10-14T19:03:06Z")

</div>

Payload data is pretty commonly manipulated with a STREAM iRule:

> **[DevCentral - An F5 Technical Community](https://community.f5.com/)**
>
> DevCentral is an online technical community where engineers and practitioners collaborate, share knowledge, and solve problems related to F5 technologies and industry trends.

---

<div class="post-metadata">

**Author:** ![Jinshu](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@Jinshu](https://community.f5.com/u/Jinshu)\
**Post date:** [October 15, 2015, 9:10am UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/6 "2015-10-15T09:10:22Z")

</div>

Thanks Kevin.. It is working now..!!! I have used below irule to allow insecure content for http refereces and enabled stram profile in the VS.

```tcl
when HTTP_REQUEST {

     Save the requested host value
    set host [string tolower [HTTP::host]]

     If the HTTP host header is blank, use the VS IP address
     If the VS IP is not routable for clients, hard code a routable IP
     to replace [IP::local_addr]
    if {$host eq ""}{set host [IP::local_addr]}

     Disable the stream filter by default
    STREAM::disable
}
when HTTP_RESPONSE {

     Check if response type is text and host isn't null
    if {[HTTP::header value Content-Type] contains "text" and $host ne ""}{

         Replace http://$host with https://$host
        STREAM::expression "@http://$host@https://$host@"

         Enable the stream filter for this response only
        STREAM::enable

    }
     Rewrite the Location header in redirects to https://
    if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] starts_with "http://$host"} {
        HTTP::header replace Location [string map -nocase "http://$host https://$host" [HTTP::header Location]]
    }
}

```

---

<div class="post-metadata">

**Author:** ![Jinshu](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@Jinshu](https://community.f5.com/u/Jinshu)\
**Post date:** [November 29, 2015, 1:17pm UTC](https://community.f5.com/t/login-forms-are-not-displaying-after-changing-http-to-https/49538/7 "2015-11-29T13:17:25Z")

</div>

Hello,

I have used above irule for http to https issue but now facing a new problem. The application hosted behind sees the request url as http:// and it tries to respond back accordingly causing the problem.

I have captured TCPDUMP and found there is a field full request URI mentioning http://

Can I get this replaced with irule?
