Skip to main content
June 13, 2017
解決済み

Best way to customize resourceResolver behavior

  • June 13, 2017
  • 3 の返信
  • 853 ビュー

Given an AEM 5.6.1 environment, what's the best way to use request headers to generate a resource path prefix?

For instance, suppose the locale is provided via httpRequest.getHeader("locale"), and our content is organized in the following tree:

en_US/homepage.html

ja_JP/homepage.html

How would you take a request for /homepage.html and internally prepend the locale retrieved from httpRequest.getHeader("locale")?

このトピックへの返信は締め切られました。
ベストアンサー MC_Stuff

Hi ofuangka,

   JCR resolver & mapping con't resolve at run time and configuration should exist prior. For your use case one of the option is to use apache rewrite rule. 

Thanks,

3 の返信

smacdonald2008
Level 10
June 13, 2017
June 13, 2017

I didn't see anything there that uses HTTP request headers for mapping.  Did I miss something?

MC_Stuff
MC_Stuff回答
Level 10
June 14, 2017

Hi ofuangka,

   JCR resolver & mapping con't resolve at run time and configuration should exist prior. For your use case one of the option is to use apache rewrite rule. 

Thanks,