# HTTP and HTTPS from same VS

**URL:** <https://community.f5.com/t/http-and-https-from-same-vs/56135>\
**Category:** Technical Forums\
**Tags:** irules, big-ip, application-delivery\
**Created:** [April 19, 2021, 9:24am UTC](https://community.f5.com/t/http-and-https-from-same-vs/56135 "2021-04-19T09:24:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micky\_Hertford](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Micky\_Hertford](https://community.f5.com/u/Micky_Hertford)\
**Post date:** [April 19, 2021, 9:24am UTC](https://community.f5.com/t/http-and-https-from-same-vs/56135/1 "2021-04-19T09:24:08Z")

</div>

Hi, is it possible (and if so some advice for a newbie) to have a virtual server listening on port https and depending on the url, forwarding on either http or https to the pool.

so [https://site.com/url1](https://site.com/url1) is forwarded to the pool on https but requests to [https://site.com/url2](https://site.com/url2) would be forwarded to the pool on http.

Many thanks for your time..

---

<div class="post-metadata">

**Author:** ![spalande](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/spalande/32/10043_2.png) [@spalande](https://community.f5.com/u/spalande)\
**Post date:** [April 19, 2021, 10:19am UTC](https://community.f5.com/t/http-and-https-from-same-vs/56135/2 "2021-04-19T10:19:15Z")

</div>

Yes. there are many ways to do it. serverssl can be selectively enable or disable for the urls.

E.g. one of the option is to apply serverssl on the VIP and disable it for /url2.

iRule option:

```tcl
when HTTP_REQUEST {
	    switch -glob [string tolower [HTTP::uri]] {
	    	"/url1*" 
			{
		    pool https_pool
	    	}
	    	"/url2*" 
	        {
			SSL::disable serverside
		        pool http_pool
	    	} default {
          return
	    }
      }
}

```

ltm policy option:

rule 1-

http uri --\> path starts with --\> /url1 --\> at request

action: forward traffic to https\_pool

rule2;

http uri --\> path start with --\> /url2

action1: disable server ssl --\> at request

action2: forward traffic to http\_pool

---

<div class="post-metadata">

**Author:** ![Micky\_Hertford](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Micky\_Hertford](https://community.f5.com/u/Micky_Hertford)\
**Post date:** [April 19, 2021, 10:34am UTC](https://community.f5.com/t/http-and-https-from-same-vs/56135/3 "2021-04-19T10:34:54Z")

</div>

Yes that worked, many thanks for your quick response…
