<?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 flexible pattern URL mapping .html site to COS in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/flexible-pattern-URL-mapping-html-site-to-COS/m-p/247904#M10750</link>
    <description>&lt;P&gt;Is there a way to use one redirect to re-direct all of the old .html pages to Hubspot COS pages.&lt;/P&gt;&lt;P&gt;Something like this old page&lt;/P&gt;&lt;PRE&gt;redirect
https://www.mysite.com/about.html 
with this code 
https://www.mysite.com/{rest of url}.html

redirect to my new hubspot page
https://www.mysite.com/{rest of url}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am trying to avoid a bunch of page level redirects from the old .html pages to the new Hubspot COS pages&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Jan 2019 17:42:20 GMT</pubDate>
    <dc:creator>TwoM</dc:creator>
    <dc:date>2019-01-27T17:42:20Z</dc:date>
    <item>
      <title>flexible pattern URL mapping .html site to COS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/flexible-pattern-URL-mapping-html-site-to-COS/m-p/247904#M10750</link>
      <description>&lt;P&gt;Is there a way to use one redirect to re-direct all of the old .html pages to Hubspot COS pages.&lt;/P&gt;&lt;P&gt;Something like this old page&lt;/P&gt;&lt;PRE&gt;redirect
https://www.mysite.com/about.html 
with this code 
https://www.mysite.com/{rest of url}.html

redirect to my new hubspot page
https://www.mysite.com/{rest of url}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am trying to avoid a bunch of page level redirects from the old .html pages to the new Hubspot COS pages&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jan 2019 17:42:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/flexible-pattern-URL-mapping-html-site-to-COS/m-p/247904#M10750</guid>
      <dc:creator>TwoM</dc:creator>
      <dc:date>2019-01-27T17:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: flexible pattern URL mapping .html site to COS</title>
      <link>https://community.hubspot.com/t5/CMS-Development/flexible-pattern-URL-mapping-html-site-to-COS/m-p/247910#M10751</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83809"&gt;@TwoM&lt;/a&gt;&amp;nbsp;this is something I was able to accomplish recently for a project I was working on. I'm sure you've already come across &lt;A href="https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-do-i-set-up-a-flexible-pattern-url-mapping" target="_self"&gt;this article&lt;/A&gt;. There are two types of components you can add into your flexible URL mappings. One is the * asterisk character and the other is the : colon character. The * asterisk character creates a component that goes all the way until the very end of the URL, which in your case would include the html&amp;nbsp;at the end of the URL which we wouldn't want. The : colon character, on the other hand,&amp;nbsp;creates a named component that is matched until the next delimiter character (./=&amp;amp;?). So in your scenario, you can accomplish this with a few different redirects (you'd need to set up one for each subdirectory that you have on your site). Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original URL:&lt;/STRONG&gt; /:item.html&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Redirected To:&lt;/STRONG&gt; /{item}&lt;/P&gt;&lt;P&gt;* would work for URLs with the pattern of &lt;A href="http://www.test.com/test.html" target="_blank"&gt;www.test.com/test.html&lt;/A&gt; &amp;gt; &lt;A href="http://www.test.com/test" target="_blank"&gt;www.test.com/test&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original URL:&lt;/STRONG&gt; /:item/:item2.html&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Redirected To:&amp;nbsp;&lt;/STRONG&gt;/{item}/{item2}&lt;/P&gt;&lt;P&gt;*would work for URLs with the pattern of &lt;A href="http://www.test.com/test/test.html" target="_blank"&gt;www.test.com/test/test.html&lt;/A&gt; &amp;gt; &lt;A href="http://www.test.com/test/test" target="_blank"&gt;www.test.com/test/test&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original URL:&lt;/STRONG&gt;&amp;nbsp;/:item/:item2/:item3.html&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Redirected To:&lt;/STRONG&gt;&amp;nbsp;/{item}/{item2}/{item3}&lt;/P&gt;&lt;P&gt;*would work for URLs with the pattern of &lt;A href="http://www.test.com/test/test/test.html" target="_blank"&gt;www.test.com/test/test/test.html&lt;/A&gt; &amp;gt; &lt;A href="http://www.test.com/test/test/test" target="_blank"&gt;www.test.com/test/test/test&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jan 2019 22:38:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/flexible-pattern-URL-mapping-html-site-to-COS/m-p/247910#M10751</guid>
      <dc:creator>JasonRosa</dc:creator>
      <dc:date>2019-01-27T22:38:15Z</dc:date>
    </item>
  </channel>
</rss>

