Regular Expression Question for blocking and redirecting

Answered Question
Mar 5th, 2010

I am currently using regular expression to block certain websites.  I have two questions about this.  My regular expressions are working fine, what I would like to know is if I can have more than value defined in each expression.

Example

currently I have blockedsite1 ---> facebook\.com, blockedsite2 -->myspace\.com

Is there a way to combine them into one such as (I know the syntax is not correct) blockedsite1 --> facebook\.com;myspace\.com

Second question.  Is there a way in the regex to define a redirect.

Example:  A user hits facebook.com.  Can the regex or another rule based off the regex redirect the user to our corporate website.

Thanks in Advance

l8nite

I have this problem too.
0 votes
Correct Answer by Kureli Sankar about 6 years 9 months ago

I am not sure if either of them is possible.

Pls. refer this link: http://supportforums.cisco.com/docs/DOC-1268

regex command reference: http://www.cisco.com/en/US/docs/security/asa/asa82/command/reference/qr.html#wp1788742

|

Alternation

Matches either expression it separates. For example, dog|cat matches dog or cat.

See if you can use the above metacharacter and see if you can do what you are looking to do.

-KS

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Kureli Sankar Fri, 03/05/2010 - 15:50

I am not sure if either of them is possible.

Pls. refer this link: http://supportforums.cisco.com/docs/DOC-1268

regex command reference: http://www.cisco.com/en/US/docs/security/asa/asa82/command/reference/qr.html#wp1788742

|

Alternation

Matches either expression it separates. For example, dog|cat matches dog or cat.

See if you can use the above metacharacter and see if you can do what you are looking to do.

-KS

Actions

This Discussion