5 Replies Latest reply: Jul 15, 2014 6:58 AM by PraveenKM RSS

    Is there any way to expire vanity URL once the asset gets expired

    PraveenKM

      Hi All,

      Is there anyway to make the vanity url expire automatically once the asset gets expired ?

       

       

      Thanks in Advance,

      Praveen

        • 1. Re: Is there any way to expire vanity URL once the asset gets expired
          1038064

          Interesting question.

           

          What would like to have actually happen ? 

          • 2. Re: Is there any way to expire vanity URL once the asset gets expired
            PraveenKM

            Hi Scanlonjts,

            Basically whenever we preview the vanity url directly by hitting the url present in the URL section of the asset , the contents will be displayed as a webpage.

             

            In WCS we have tags to check the end date of the asset and filters all the assets dynamically at runtime.

            What I want is whenever the asset gets expired the URL should also be expired so that when I hit the URL directly from my browser ,it should show me some error Ex: Page not found or No resource found.

             

             

            Hope my information is clear.

             

            Regards,

            Praveen

            • 3. Re: Is there any way to expire vanity URL once the asset gets expired
              Gerardo Rodriguez

              Hello Praveen,

              Maybe you could check at the beginning of the template if the asset (page asset I suppose) is valid with the tags you mention.

              If after the tag, the cid is not valid anymore (you do not have it in the output list) you could show a different HTML with a error or redirect to a error page.

              In this way you will invalidate the vanity URL and the WCSites one (the one with parameters).

              Hope it helps.

              Gerardo

              • 4. Re: Is there any way to expire vanity URL once the asset gets expired
                997017

                Hello Praveen,

                 

                I would like to understand the business case.

                1. What is part of the page that is rendered by this vanity URL? Just header, footer and content?

                2. If so, could you explain the use case for using start date and end date for your assets?

                3. BTW, what will happen in your template after content expiry?

                • 5. Re: Is there any way to expire vanity URL once the asset gets expired
                  PraveenKM

                  Hi,

                  First of all ,thanks for your reply.

                   

                  Answers for your questions is below :

                  1. What is part of the page that is rendered by this vanity URL? Just header, footer and content?

                  >>>>>Only the content part in the page is rendered by Vanity URL.

                   

                  2. If so, could you explain the use case for using start date and end date for your assets?

                  >>>>> Both the dates are used to check whether a particular content is expired or not. (More details below)

                   

                  3. BTW, what will happen in your template after content expiry?

                  >>>>>> Content is considered expired If, startdate is greater than system date then that content will be automatically hidden from the webpage and the same logic is used for the enddate as well where if enddate is less than system date then hide it. This logic is applied only for the assets that are rendered and displayed and not for the texts that are shown.

                   

                  Coming to my question , suppose if I have an assettype Content_C and a template which renders the contents from Content_C asset.

                  Now I have configured a webroot and a URL pattern for the above assettype which will automatically generate a Vanity/Friendly URL for each asset that i create.

                   

                  For Example : If I create an asset Content_C_Asset1 with the template that i created to render the contents of this type ,then my vanity url will be something like "/webroot/URLPattern/Content_C_Asset1. If the enduser has bookmarked this URL then he will be able to see the contents of this asset.

                   

                  So basically since the asset is expired the same should be applied to the URL that is present for the asset.

                   

                  Thanks & Regards,

                  Praveen