-2

What is the meaning of the below mentioned terms ? Are they any different from each other?

  • URL Redirect Rules
  • Resource resolver settings for URL shortening
  • Sling Mapping
  • Vanity URL
  • Vanity Domain

Update :: Re- constructed the question

As per my understanding the above terms mean the same thing. I have read the documentation but haven't clearly understood it.

Thomas
  • 1,302
  • 9
  • 16
Oliver
  • 6,152
  • 2
  • 42
  • 75
  • 1
    Hi Oliver, at the moment it sounds like what you want is "better documentation" rather than an answer to a specific question — saying that you've read the documentation & understanding "nothing" leaves people in no better place to help you, as it's unclear what in particular you didn't understand. Maybe try reworking your question into one or more focused questions on one aspect of the above — giving precisely what you've looked at & why it didn't make sense in the context that you're working in. – anotherdave Jul 21 '14 at 10:15
  • @anotherdave : I have edited the question, can you please explain the meaning to me? – Oliver Jul 21 '14 at 10:23
  • it's tidier now but I think to get a good response you'd still need to make it clearer and more specific — No-one minds answering questions at any level, but this (resource resolution & URL mapping) is a *huge* part of Apache Sling/Adobe CQ; it could form a booklet of information. Whole topics within languages or frameworks aren't really well suited to questions on Stack Overflow. Try making the question relate to *one specific thing* that you don't understand, then provide info on what docs you looked at, what within it you didn't understand, what happened when you tried it out, etc. – anotherdave Jul 21 '14 at 10:35
  • @anotherdave A brief overview would really help. One doesn't necessarily have to explain in depth. – Oliver Jul 21 '14 at 10:38

2 Answers2

5

Found an awesome link to my questions.

AEM URL Rewriting The typical website structure for an Adobe CQ5/AEM project begins with /content in the URL structure and typically contains the application name. My example application’s homepage has the URL structure /content/cookbook/en/home.html which matches the JCR structure for the website. This is not an ideal url path most people would like for their site. To address this concern we will utilize two methods for rewriting URLS within AEM.

Sling Resource Resolver Inside AEM you can configure the Sling Resource Resolver to filter out the initial path of your site structure. To achieve this you need to edit the Apache Sling Resource Resolver Factory inside the system console’s configuration section (/system/console/configMgr). You will need to add an entry under the URL Mapping property to remove the beginning portion of the URL you want remapped. In my case I have entered /content/cookbook/-/ so that /en/books.html now resolves the url /content/cookbook/en/books.html. This will apply to all sites within your site so you may want to review your site structure to avoid a conflict.

Vanity URLs For some sites there might be a requirement to create a friendly url for navigating into your site. In my case I want to type http://localhost:4502/books to navigate to the /en/books.html page. In this scenario I may just decide to edit the Vanity URL property for the books.html page. I can specify that /books is the vanity url and any traffic to that URL will be redirected to books.html. This can be convenient for site with only a couple vanity URLs but isn’t idea since it can be edited by an author.

Sling Resource Mappings If you wish to keep url mapping rules outside of the author’s control then you should utilize the Resource Mapping features in Sling. Under /etc/map/http you can create nodes of the jcr type sling:Mapping that will allow you to do the same thing as vanity urls. These nodes require two properties to be set: sling:match and sling:internalRedirect. The sling:match property uses regular expression to evaluate the url to match. If the url is matched then the request is redirected to the path set in the sling:internalRedirect property. In the example application, the matched path localhost.4502/authors is redirected to the /content/cookbook/en/authors.html page.

Oliver
  • 6,152
  • 2
  • 42
  • 75
1

I'll give it a try:

  • URL Redirect Rules -> This sounds for me more like mod_rewrite in apache
  • ResourceResolver settings -> Can be configured in OSGi (Apache Sling Resource Resolver Factory). Usually the path to a page starts with /content/sitename/language. So the language maybe interesting for the visitor, but the first two are not, so you want to map /content/sitename/ to / so you can have call mydomain.com/language in the browser
  • Sling mapping is more or less the same logic as ResourceResolver, but you don't configure the ResourceResolver in OSGi, but have a mapping below /etc/map/http
  • VanityUrl -> This is more like an alias for a path mostly used for marketing URLS like mydomain.com/product1 which could point to /content/sitename/language/products/product1 It would not make sense to have a ResourceResolver or Sling mapping for each product
  • Vanity Domain is linked to VanityUrl so you can have the same VanityUrl for different domain: mydomain.com/product1 ponts to a different site than myseconddomain.com/product1
Thomas
  • 6,325
  • 4
  • 30
  • 65