cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

create a clean URL Rule

a_gravier
Helper

Hello,

I'm trying to create a clean rule on a PHP service in order to group the checkout operations on the sames transactions (despite the ID).

Examples of checkout URI:

fr/checkout/57341

fr/checkout/57341/rest/payment-validate

fr/checkout/57341/billing

fr/checkout/57341/complete

When I configure the rule with this regex :

\/checkout(\/\d+)

all the segment /checkout/57341 is masked and not only the 57341.


How to mask only the value 57341 ?

FYI, the /checkout expression is to match only the URI related to the checkout transactions.

Thank you.

Regards Aurélien

10 REPLIES 10

nj_njoku
Inactive

Hi AURELIEN,

Can you please elaborate? Are you trying to create a server-side service request cleanup rule? In the particular service the request belongs to, edit the Settings -> web Request Naming and you should see option to Create URL cleanup rule

https://www.dynatrace.com/news/blog/track-business...

Thanks

NJ

Sorry, the content didn't appears the first time so I added a new answer below.

a_gravier
Helper

Hello,

I'm trying to create a clean rule on a PHP service in order to group the checkout operations on the sames transactions (despite the ID).

Examples of checkout URI:

fr/checkout/57341

fr/checkout/57341/rest/payment-validate

fr/checkout/57341/billing

fr/checkout/57341/complete

When I configure the rule with this regex :

\/checkout(\/\d+)

all the segment /checkout/57341 is masked and not only the 57341.


How to mask only the value 57341 ?

FYI, the /checkout expression is to match only the URI related to the checkout transactions.

Thank you.

Regards Aurélien

Hi @Aurélien G. were you able to solve your issue? I have a similar problem and can't seem to find a solution.

nj_njoku
Inactive

Hi Aurelien,

The following regex should work in the URL cleanup rule. I will test it though in a lower environment just to be sure it works correctly

fr\/checkout\/([0-9]+).*

Please let me know if this works for you

Thanks

NJ

Hey NJ,

How does this work now? I don't see this in the service options anymore

Rick B


Nothing has changed that I'm aware of, are you looking at this view under the specific service's settings?


is it somehow not detecting my service as a "web" based service, despite having URL:Path e.g. as a valid placeholder?


I think it is detecting it as a web service instead of as a web request service.

I see for those you only have the options to define names not generate URL cleanup rules. That is based on the frameworks that are being used - a bit more here.


neil_davies
Newcomer

This doesn't work for me. doing a regexp along the lines of prefix(deletematch)suffix still deletes the ENTIRE matched string, rather than the "deletematch" only. This is rather a big functional hole; the "modern" REST method has this as a standard practice.


Featured Posts