Solved

Regular expression

Posted on 2013-11-06
3
220 Views
Last Modified: 2013-12-11
I'm looking for a regular expression to match

/administrator/index.php

from this URL

www.domain.com/administrator/index.php?=345678
0
Comment
Question by:Provost
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39628153
Depending on your programming language or text editor's capabilities, this may work:

/[^?]*

Open in new window

0
 

Author Comment

by:Provost
ID: 39628210
This is in VCL (Varnish configuration language)

I want to match exclusively all URL containing

/administrator/index.php
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39628273
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question