tag:blogger.com,1999:blog-5778419059463879376.post6310026496196823359..comments2024-03-28T23:09:52.265-07:00Comments on Adobe CQ/Adobe AEM: How to Remove .html extension from URL in CQ Or How to Implement New Rewriter Pipeline in CQ / AEMYogihttp://www.blogger.com/profile/13222275932054732457noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-5778419059463879376.post-74783207646877604112015-07-21T18:04:59.169-07:002015-07-21T18:04:59.169-07:00Hi Yogesh,
I have the same requirement on our proj...Hi Yogesh,<br />I have the same requirement on our project and we are working on AEM 6.0 service pack2. I tried the steps mentioned above of checking "strip of html extension" from link checker transformer OSGI configuration and restarted AEM and used the apache redirect in apacher server but its removing the .html extension from end user url but not serving the page. Its also not able to cache the page as its a extension less URL recieved by dispatcher. Appreciate a quick response on this.Unknownhttps://www.blogger.com/profile/13799679686713302749noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-82592902794310985992015-06-06T14:24:51.036-07:002015-06-06T14:24:51.036-07:00Hello Chelsea,
It is working for me. Can you also...Hello Chelsea,<br /><br />It is working for me. Can you also try https://drive.google.com/file/d/0B3d7-oHroQKdQTZfX2lITWY4WG8/view?usp=sharing<br /><br />YogeshYogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-70125017175667374722015-05-04T03:54:58.861-07:002015-05-04T03:54:58.861-07:00Package is not accessable. gives 404. Can you plea...Package is not accessable. gives 404. Can you please post the package.Chelseahttps://www.blogger.com/profile/15521462053942679931noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-90245099690946086412014-04-29T12:26:37.049-07:002014-04-29T12:26:37.049-07:00This comment has been removed by the author.vivekhttps://www.blogger.com/profile/02809574749916366822noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-3114120239850034922013-11-04T10:17:46.192-08:002013-11-04T10:17:46.192-08:00See example under /libs/cq/config/rewriter/pdf wit...See example under /libs/cq/config/rewriter/pdf with "empty-generator" "generator Type". However note that CQ already has xml renderer OOTB, not sure if that will conflict with your rewriter.<br /><br />YogeshYogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-60367018837970605952013-10-31T06:34:31.626-07:002013-10-31T06:34:31.626-07:00i have custom transformer( that is global one name...i have custom transformer( that is global one name="pipeline.mode" value="global") which has the logic to rewrite public urls from html and xml respose but it is working for html now i want to extend this for xml as well how to do that?<br />I need right configuration.<br />Please help me.<br />just extension and contenttype is engough for this to work?ettahoneyhttps://www.blogger.com/profile/07371968474154593200noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-55062588992902374932013-10-24T11:04:29.103-07:002013-10-24T11:04:29.103-07:00Kyle,
I think you should raise a enhancement requ...Kyle,<br /><br />I think you should raise a enhancement request for this. Ideally your pipeline should not break even if serialize type is not present.<br /><br />YogeshYogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-19132236329802417272013-10-15T10:00:43.915-07:002013-10-15T10:00:43.915-07:00Hi Yogesh,
I've implemented something very s...Hi Yogesh, <br /><br />I've implemented something very similar to this, in my case its a transformer that strips out specific url's based on a pattern. It has been placed in the pipeline directly before the linkchecker so that the pipeline is like this:<br />link-blocker -> linkchecker -> ....<br /><br />this has been done as suggested by copying /libs/cq/config/rewriter/default to /apps/myapp/config/rewriter/html-remover (or similar)<br /><br />One potential issue is that "link-blocker" may not be available (ie the service or bundle is stopped), and thus the pipeline is broken. Is there some way of injecting my transformer into the pipeline when the bundle is loaded such that if the bundle is deactivated or removed the pipeline doesn't break?<br /><br />The only important thing is that my transformer is run before the linkchecker.<br /><br /><br />Thanks<br />kyle<br />kylehttps://www.blogger.com/profile/18347343728081513399noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-21167394532025844982013-10-07T13:33:58.671-07:002013-10-07T13:33:58.671-07:00Hello Purnendra,
Yes you are right only links wit...Hello Purnendra,<br /><br />Yes you are right only links with .html extension is getting rewritten. If you want other links to get rewritten as well, you might have to right custom rewriter as given in above document. You can also raise enhancement request with Adobe to handle rewriting of DAM URLs.<br /><br />YogeshYogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-57907429939137699082013-10-03T11:55:13.201-07:002013-10-03T11:55:13.201-07:00CQ 5.5CQ 5.5Anonymoushttps://www.blogger.com/profile/13582033362305052055noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-26984009117989122752013-09-30T16:09:57.560-07:002013-09-30T16:09:57.560-07:00What version of CQ you are using ? What version of CQ you are using ? Yogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-83903576340710723182013-09-23T07:09:27.663-07:002013-09-23T07:09:27.663-07:00no...its not happening I have tried only link with...no...its not happening I have tried only link with .htm or .html are getting rewritten. <br />all my website links are getting resolved but only if extension is .htm or .html .<br />and i am taking about only internal links .....Anonymoushttps://www.blogger.com/profile/13582033362305052055noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-10326508658665284262013-09-20T10:18:06.326-07:002013-09-20T10:18:06.326-07:00Purmendra,
Rewriter works based on your entry on ...Purmendra,<br /><br />Rewriter works based on your entry on mapping config and in sling resource resolver mapping. Check this http://helpx.adobe.com/cq/kb/HowToConfigureLinkRewriting.html if you have entry like /content/-/ then even your pdf and jsg will get rewritten as long as they have that extension and exist in repository.<br /><br />External links never get rewritten.<br /><br />YogeshYogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-70274172249258730282013-09-20T09:14:46.661-07:002013-09-20T09:14:46.661-07:00CQ Link rewrite doesn’t work for extensions like...CQ Link rewrite doesn’t work for extensions like .jpg and .pdf by default .CQ only rewrites URLS which are having .html extensions but it doesn’t take care of the URLs which are having other extensions.<br />Example : <br />If we have<br />a href="/content/A/B.html"<br />And if url in href "/content/A/B.html" is mapped to “/A/B.html” then rewriter will change this to a href="/A/B.html"<br />But same is not true for other URLs which are having different extensions <br />a href="/content/A/B.pdf " Won’t get converted to a href="/A/B.pdf "<br /><br />I am looking to know the configuration where we can add other extensions so that rewriter will pic these URLS as well.<br />Anonymoushttps://www.blogger.com/profile/13582033362305052055noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-70505226590736647372013-09-20T09:12:53.173-07:002013-09-20T09:12:53.173-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/13582033362305052055noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-24871102216027824522013-07-16T06:33:59.697-07:002013-07-16T06:33:59.697-07:00Fixed it. Artifact "org.apache.sling.rewriter...Fixed it. Artifact "org.apache.sling.rewriter" should be used in scope "provided" (in Maven) in order to use it only during compilation. Otherwise this dependency will be uploaded into repo and this artifact and another at CQ will be loaded by different classloaders which causes this trouble.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-45657095719599789452013-07-16T06:10:57.207-07:002013-07-16T06:10:57.207-07:00Hi. I am trying to implement such functionality bu...Hi. I am trying to implement such functionality but all the time I am getting exception:<br /><br />Caused by: java.lang.ClassCastException: (...).service.LinkRewritingSampleTransformerFactory cannot be cast to org.apache.sling.rewriter.TransformerFactory<br /><br />CQ 5.5<br /><br />Can you help me?<br /><br />Thank you in advance.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-89029427056357298512013-04-04T15:55:18.362-07:002013-04-04T15:55:18.362-07:00I will say, this is the first example I have ever ...I will say, this is the first example I have ever found using the transformer factory/transformer in Sling/CQ. I work much better with examples, and this example was just enough for me to follow and replicate.<br /><br />Thanks a million for the example, especially the source code. You are a life saver!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-81529788337230385462012-10-19T03:54:31.022-07:002012-10-19T03:54:31.022-07:00The above packages are very useful & simple.
T...The above packages are very useful & simple.<br />Thanks yogeshLavanyahttp://howmobile.netnoreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-23651021669838038132012-05-30T19:24:33.619-07:002012-05-30T19:24:33.619-07:00From JSP, I should be able to send a chunk of HTML...From JSP, I should be able to send a chunk of HTML generated to transformer and get back absolute urls.ban1975https://www.blogger.com/profile/10380192850252316529noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-8413514094439856832012-05-30T19:19:03.185-07:002012-05-30T19:19:03.185-07:00Not sure what do you mean by On demand ... I gues...Not sure what do you mean by On demand ... I guess for that you could use sling resource resolver.Yogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-36294961373126175422012-05-30T18:57:53.349-07:002012-05-30T18:57:53.349-07:00Thank you Yogesh,
is there anyway we can call this...Thank you Yogesh,<br />is there anyway we can call this functionality on demand, from component, essentially JSP, Servlet.? I want to write a sample to tranform part of HTML to absolute urls, which needs to performed on demand.ban1975https://www.blogger.com/profile/10380192850252316529noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-7229098645929480302012-05-30T13:57:16.495-07:002012-05-30T13:57:16.495-07:00Sorry for missing package. Updated new package and...Sorry for missing package. Updated new package and some more information.Yogihttps://www.blogger.com/profile/13222275932054732457noreply@blogger.comtag:blogger.com,1999:blog-5778419059463879376.post-39284252099106464122012-05-29T10:17:26.077-07:002012-05-29T10:17:26.077-07:00Package is not accessable. gives 404. Can you plea...Package is not accessable. gives 404. Can you please post the package.ban1975https://www.blogger.com/profile/10380192850252316529noreply@blogger.com