You can use the grepl function from base R or the str_detect function from the stringr package to return TRUE or FALSE whether a string contains another string. With that, a standard if and else structure should get you what you need.
Page = "https://forum.posit.co/"
grepl("rstudio.com/", Page)
#> [1] TRUE
library(stringr)
#> Warning: package 'stringr' was built under R version 3.5.3
str_detect(Page, "rstudio.com/")
#> [1] TRUE
Created on 2019-11-05 by the reprex package (v0.3.0.9000)