Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Regular expression

Posted on 2013-11-06
3
Medium Priority
?
224 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 1500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

886 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