<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom clean URL Rules, how does this really work? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166426#M17063</link>
    <description>&lt;P&gt;Dynatrace is a bit... Unusual in the way it handles Regexes. In this scenario, it's removing all of the matched text in your regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;P&gt;`(?&amp;lt;=\/products\/)\d+(?=\/)`&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 11:59:20 GMT</pubDate>
    <dc:creator>andrew_knackste</dc:creator>
    <dc:date>2021-05-21T11:59:20Z</dc:date>
    <item>
      <title>Custom clean URL Rules, how does this really work?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166366#M17052</link>
      <description>&lt;P&gt;I'm struggling with the clean URL rule for services. Haven't found a single working solution apart from using request naming rules (I don't want to use request naming rules if clean url rule feature exists).&lt;BR /&gt;Does someone have a clear explanation on how these regexes should look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the example given in the UI I'd assume one defines capture groups in the regex and the capture groups would form the "new" url value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg if my URL is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/api/v3/domain/products/000840001903&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and my "clean url regex" is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(.*\/products?\/)[0-9]*(.*)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then I'd assume the clean url becomes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/api/v3/domain/products/&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;(which would be the concatenation of the capture groups?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But instead of that I do get the whole URL replaced with "/"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The examples look similar, though all seem to only work for query parameters, not for URL paths.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="r_weber_0-1621539071660.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/1035i62453123573F3A4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="r_weber_0-1621539071660.png" alt="r_weber_0-1621539071660.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Documentation with further examples on that feature is also missing and it seems lots of people have the same issue...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 13:11:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166366#M17052</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2021-06-30T13:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Custom clean URL Rules, how does this really work?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166426#M17063</link>
      <description>&lt;P&gt;Dynatrace is a bit... Unusual in the way it handles Regexes. In this scenario, it's removing all of the matched text in your regex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;P&gt;`(?&amp;lt;=\/products\/)\d+(?=\/)`&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 11:59:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166426#M17063</guid>
      <dc:creator>andrew_knackste</dc:creator>
      <dc:date>2021-05-21T11:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom clean URL Rules, how does this really work?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166539#M17106</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/1756"&gt;@andrew_knackste&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is indeed a bit unusual and not really obvious &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks for sharing! The lookahead match works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just questioning the feature right now as it somehow overlaps with request naming rules and can't even be applied globally or via an API. Also it would be really useful if a "clean url rule" would have options to REPLACE the found string with a custom string like "&amp;lt;productid&amp;gt;" so that the user would know that something has been removed here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would be especially useful if you have a scenario where you remove multiple parts like:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/api/v3/CAT-0432A/products/000840001903&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The result of one or multiple clean url rules would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/api/v3/&amp;lt;category ID&amp;gt;/products/&amp;lt;product ID&amp;gt;/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I'll add an RFE for that.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 08:17:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/166539#M17106</guid>
      <dc:creator>r_weber</dc:creator>
      <dc:date>2021-05-25T08:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom clean URL Rules, how does this really work?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/176394#M19145</link>
      <description>&lt;P&gt;Yes, it definitely overlaps with naming rules. I'm also missing the replacement feature as typically just removing parts may result into two different request types being joined. For example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/customers/delete&lt;/LI&gt;&lt;LI&gt;/customers/123/delete&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That's why I mostly try to use naming rules instead. For an example of how to cleanup such IDs globally across services, see &lt;A href="https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-Global-request-naming-for-REST-services/td-p/176341" target="_self"&gt;my tip&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:21:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Custom-clean-URL-Rules-how-does-this-really-work/m-p/176394#M19145</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2021-11-24T12:21:27Z</dc:date>
    </item>
  </channel>
</rss>

