• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Regular expression

I'm looking for a regular expression to match

/administrator/index.php

from this URL

www.domain.com/administrator/index.php?=345678
0
Provost
Asked:
Provost
  • 2
1 Solution
 
käµfm³d 👽Commented:
Depending on your programming language or text editor's capabilities, this may work:

/[^?]*

Open in new window

0
 
ProvostAuthor Commented:
This is in VCL (Varnish configuration language)

I want to match exclusively all URL containing

/administrator/index.php
0
 
käµfm³d 👽Commented:
If that be the case, then you can simply put that as your pattern.

e.g.

if (req.http.host ~ "/administrator/index\.php") {
   // do something
}

Open in new window


...based on what I see at:  https://www.varnish-cache.org/docs/3.0/reference/vcl.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now