Quantcast
Channel: Forcepoint Community
Viewing all articles
Browse latest Browse all 2011

Regular Expression (regex) to permit domain and all subdomains with or without www

$
0
0

Dear All,

I need to permit with a regex the website.com entire domain and subdomains.

  • http://xxxx.website.com
  • https://xxxx.website.com
  • http://website.com
  • https://website.com

I don't want domains that contain the phrase "website.com", e.g. http(s)://phishingWEBSITE.com

I create a regex (It works fine in other systems wich manage regex expressions) that permit the access but Websense says an error in Triton:

The following regular expressions contain syntax errors: ^((http|https)://)(((.*)\.website.com)|website.com).

^((http|https)://)(((.*)\.website.com)|website.com)


In Websense Technical Documents says this:

http://www.websense.com/support/article/kbarticle/Regular-Expressions-in-Websense-Software


############################################################################

Notes & Warnings

Important Note:

When using regex generator such as Google's generator (see link below), you must add a pipe "|" between each successive parentheses. For example, "(( or ))" must be edited to be "(|( or )|)" for the Websense engine to understand the expression.

############################################################################

If I use "|" between each successive parentheses the regex works, but for all websites, and permit all access to all urls:

^(|(http|https)://)(|(|(.*)\.website.com)|website.com)


Works for all websites:

http://xxxx.website.com   
https://xxxx.website.com   
http://website.com   
https://website.com   
http://xxxxxxWEBSITE.com    ==> not website.com domain
https://phishingWEBSITE.com    ==> not website.com domain
https://www.clarin.com.ar ==> not website.com domain
http://lanacion.com ==> not website.com domain

 

Thanks.


Viewing all articles
Browse latest Browse all 2011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>