Vanity url что это
Dispatcher Vanity URLs
This document will help you understand how AEM deals with vanity urls and some additional techniques using rewrite rules to map content closer to the edge of delivery
What are Vanity URLs
When you have content that lives in a folder structure that makes sense it doesn’t always live in a URL that’s easy to reference. Vanity URLs are like shortcuts. Shorter or unique URLs that reference where the real content lives.
An example: /aboutus pointed at /content/we-retail/us/en/about-us.html
AEM Authors have the option to set vanity url properties on a piece of content in AEM and publish it.
For this feature to work you’ll have to adjust the dispatcher filters to allow the vanity through. This becomes unreasonable to do with adjusting the dispatcher configuration files at the rate that authors would need to setup these vanity page entries.
For this reason the dispatcher module has a feature to auto-allow anything listed as a vanity in the content tree.
How it works
Authoring Vanity URLs
The author visits a page in AEM and visits the page properties and add’s entries in the vanity url section.
Once they save their changes and activate the page the vanity is now assigned to this page.
Classic Content Finder:
Please understand this is very vulnerable to name space issues.
Vanity entries are global to all pages, this is just one of the short comings you have to plan for workarounds we’ll explain a few of those later.
Resource Resolving / Mapping
Each vanity entry is sling map entry for an internal redirect.
Thes maps are visible by visiting the AEM instances Felix console ( /system/console/jcrresolver )
Here is a screenshot of the a map entry created by a vanity entry:
In the above example when we ask the AEM instance to visit /aboutus it will resolve to /content/we-retail/us/en/about-us.html
Dispatcher auto-allow filters
The dispatcher in a secure state filters out requests at the path / through the dispatcher because that’s the root of the JCR tree.
It’s important to make sure publishers are only allowing content from the /content and other safe paths etc.. and not paths like /system etc..
Here is the rub, vanity urls live at the base folder of / so how do we allow them to reach the publishers while staying secure?
Simple dispatcher has an auto-filter allow mechanism and you have to install an AEM package and then configure the dispatcher to point to that packages page.
Dispatcher has a configuration section in it’s farm file:
This configuration tells the dispatcher to fetch this URL from it’s AEM instance it fronts every 300 seconds to fetch the list of items we want to allow through.
It stores it’s cache of the response in the /file argument so in this example /tmp/vanity_urls
So if you visit the AEM instance at the URI you’ll see what it fetches:
It’s literally a list, super simple
Rewrite Rules as Vanity Rules
Why would we mention using rewrite rules instead of the default mechanism built into AEM as describe above?
Explained simply, namespace issues, performance, and higher level logic that can be handled better.
Let’s go over an example of the vanity entry /aboutus to it’s content /content/we-retail/us/en/about-us.html using Apache’s mod_rewrite module to accomplish this.
This rule will look for the vanity /aboutus and fetch the full path from the renderer with the PT flag (Pass Through).
It also will stop processing all the other rules L flag (Last) which means it won’t have to traverse a huge list of rules like JCR Resolving has to do.
Along with not having to proxy the request and wait for the aem publisher to respond these two elements of this method make it much more performant.
Then the icing on the cake here is the NC flag (No Case-Sensitive) meaning if a customer flubs the URI with /AboutUs instead of /aboutus it will still work and allow the right page to fetched.
Here is an example code snippet of the include inside /etc/httpd/conf.d/enabled_vhosts/we-retail.vhost
Which Method and Where
Using AEM to control vanity entries has the following benefits
Using mod_rewrite to control vanity entries has the following benefits
Use both methods but here’s the advice and criteria on which one to use when:
If you want to use the AEM vanity feature and avoid namespace you can make a naming convention. Using vanity urls that nested like /brand1/aboutus, brand2/aboutus, brand3/aboutus.
Manage vanity URLs
某些 Creative Cloud 应用程序、服务和功能在中国不可用。
Vanity URLs in CQ
You define Vanity URLs in CQ to create easy-to-remember and easy-to-search URLs on your website.
The following video demonstrates how to define a Vanity URL for a specific page on your website.
Adobe CQ: Create a vanity URL
Verify the vanity URL
To verify the vanity URL that you created using the steps in the video, do the following:
The result of the test appears in the next line.
If you defined the URL correctly, the path value in the result displays the resolved URL.
You can also use the Sling Resource Resolver to verify issues that you face when creating vanity URLs.
For example, if the vanity URL does not exist:
Also, you defined a vanity URL but when you test the URL on the browser, another page shows up.
Again, you can use the Sling Resource Resolver to verify the resolved URL for a vanity URL. For example, you defined the same vanity URL (dealoftheday) for two pages on your website.
This issue occurs since you define vanity URLs by page. So it’s necessary to go to a specific page to define a vanity URL for that page. In this case, you inadvertently set the same vanity URL for two pages.
To get around this issue, you can either go to the Sling Resource Resolver and go through the list of Resolver Map Entries. This list contains defiend vanity URLs.
Alternatively, you can use the URL Mapping feature of CQ to replicate this functionality.
URL mapping
To create a URL map between a /content URL in your repository and a shortened URL:
[General Review] What’s a Vanity URL & Vanity Domain? [MiniTool News]
By Helen | Follow | Last Updated May 06, 2021
Summary :
This post focuses on a type of web page link called vanity URL. It elaborates on the definition, advantages, and creation of vanity URLs. Also, this essay posted by MiniTool official page introduces the related kind of domain – vanity domain.
What Is Vanity URL?
What Is a Vanity URL?
A vanity URL is a pronounceable, descriptive, and memorable URL that is commonly used to redirect URLs from one location to another. Generally, a vanity URL is a long URL that has been converted into a customized short link. It is also called a custom short URL or a branded link.
The main function of the vanity URL is to help simplify a complicated URL and its underlying purpose is to help the potential visitors remember the target page or URL link. In general, a vanity URL simplifies and shorten URLs with complicated structures to help people remember, access, and share your business easily.
Vanity URLs contain a domain name that features the brand or a relevant keyword for your business. Those URLs can be used in multiple situations including emails, social media, as well as offline marketing activities like print publications.
About URL
URL, Uniform Resource Locator, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. URL is colloquially termed a web address; it occurs mostly to reference web pages (HTTP), but are also used for file transfer (FTP), email (mailto), database access (JDBC), and other applications.
Most web browsers display the URL of a web page above the page in an address bar. Typically, a URL is formed as http://www.example.com/index.html, which indicates a protocol (HTTP), a hostname (www.example.com), as well as a file name (index.html).
Vanity URL Example
Just as mentioned above, vanity URLs are usually used in social media. Below is an example of a vanity link on Twitter.
Vanity URL vs Vanity Domain
What’s the difference between vanity URL and vanity domain? We have defined the meaning of vanity URL in the above and let’s see what is the vanity domain.
What Is a Vanity Domain?
In the domain name system (DNS), a vanity domain is a domain name that aims to express the individuality of the person on whose behalf it is registered. It is contrasted with domain names that resolve to an organization or a service that the organization offers.
Several definitions of vanity domain:
Vanity Domain Example
Vanity domain https://www.minitool.shadowmaker.com/ will forward to original domain https://www.minitool.com/.
Vanity Domain vs Vanity URL
A vanity domain is the same concept as a vanity URL except for the fact that the whole vanity domain forwards to the original domain. Usually, vanity domains are used for tracking purposes when it comes to traditional marketing collateral or efforts like video or radio ads and print.
What’s Steam Trade URL? Where is my Steam Trade URL? How to check Steam Trade URL? Read this post and get to know the Steam Trade URL finder.
How to Create a Vanity URL?
It is of great easiness to create a vanity URL. Before creating a vanity URL, you should know the three parts that consist of a vanity URL: domain, TLD, and URL slug. For example, the 3 parts of “example.chapter1/page1” are “example”, “chapter1”, and “page1” respectively.
Most social media websites have preinstalled vanity URL shorteners, such as Twitter, Facebook, and LinkedIn. Thus, if you directly put links on those sites, they will automatically turn the long links into short vanity URLs.
Yet, if you would like to create your own brand-related special vanity URL, you can follow the below steps.
Firstly, Select a Domain Name
You should pick up a domain name that reflects your business and reminds readers of you. You can rely on some services that can help you do that, such as Bit.ly.
Secondly, Choose a TLD
Thirdly, Create a URL Slug (Keyword)
After deciding the branded domain name and TLD, now, it’s time to create your whole vanity URLs by adding URL slugs to the end of your domain name + TLD.
Vanity URL FAQ
ABOUT THE AUTHOR
Position: Columnist
Graduate from university in 2014 and step in work as a tech editor the same year. Writings involve mainly in hard disk management and computer data backup and recovery. Through the years of diving deep in computer technology, Helen has successfully helped thousands of users fixed their annoying problems.
Personally, Helen loves poetry, sci-fi movies, sport and travel. And, she believes that all her life is the best arrangement from god.
Vanity URL
Examples of vanity URLs used by brands and locations:
*HSBC «Local» Ads: [http://yourpointofview.com yourpointofview.com] (on airport jetways)
*Starbucks Holiday 2006: [http://www.itsredagain.com itsredagain.com] (on takeaway coffee cups)
Look at other dictionaries:
URL shortening — For information about human generated short URLs on Wikipedia, see WP:WP and mw:Manual:Short URL. URL shortening is a technique on the World Wide Web in which a Uniform Resource Locator (URL) may be made substantially shorter in length and still… … Wikipedia
Vanity press — A vanity press or vanity publisher is a publishing house that publishes books at the author s expense [ [http://www.merriam webster.com/dictionary/vanity%20press vanity press Definition from the Merriam Webster Online Dictionary ] ] Johnathon… … Wikipedia
Vanity Fair (magazine) — Infobox Magazine title = Vanity Fair image caption = image size = 220px company = Condé Nast Publications paid circulation = unpaid circulation = total circulation = circulation year = language = English category = Culture frequency = Monthly… … Wikipedia
Vanity domain — In the Domain Name System (DNS), a vanity domain is a domain name, often a subdomain, whose purpose is to express the individuality of the person on whose behalf it is registered. This contrasts with domain names which resolve to an organisation… … Wikipedia
Vanity 6 — Infobox musical artist Name = Vanity 6 Img capt = Background = group or band Birth name = Alias = Origin = Minneapolis, Minnesota, U.S. Genre = R B, funk, soul, new wave, pop, rock Occupation = Band Years active = 1981 1983 Label = Warner… … Wikipedia
Vanity Fair (2004 film) — Infobox Film name = Vanity Fair caption = director = Mira Nair writer = William Thackeray (novel) Matthew Faulk (screenplay)Mark Skeet (screenplay)Julian Fellowes starring = Reese Witherspoon Jonathan Rhys Meyers Gabriel Byrne Eileen Atkins Bob… … Wikipedia
Vanity Beach — Infobox musical artist Name = Vanity Beach Background = group or band Origin = Helsinki, Finland flagicon|Finland Genre = Industrial rock Metal Years active = 2001 ndash; present Label = Innovation Records URL = [http://www.vanity beach.com… … Wikipedia
Vanity gallery — A vanity gallery is an art gallery that charges artists fees in order to exhibit their work and makes most of its money from artists rather than from sales to the public. Some vanity galleries charge a lump sum to arrange an exhibition, while… … Wikipedia
The Vanity Set — Infobox musical artist Name = The Vanity Set Img capt = Little Stabs of Happiness 2003 Img size = Landscape = Background = group or band Alias = Origin = New York, New York, USA Genre = Indie Years active = 2000 ndash;present Label = CARGO UK… … Wikipedia
The Vanity — is a Group 3 Australian Thoroughbred horse race held under set weight conditions with penalties, for 3 year old fillies, over a distance of 1200 metres. It is held at Flemington Racecourse in Melbourne in February. Prizemoney is AUD$200,000.Race… … Wikipedia
Vanity url что это
Vanity URLs do not replace the existing URLs in the product. They work along with the existing URLs. Users can use existing or vanity URLs to access the content. Content Contributors can auto-generate or create a vanity URL in the Contributor interface.
An example of a «normal» WebCenter Sites URL could be:
where the vanity URL for the same asset could be
This shows how the vanity URL is useful, being both simpler to type (particularly on a Mobile device), and easier for a user to read and recall later.
Vanity URLs consist of two parts. First, the WebRoot, which is the control of how the vanity URL is interpreted in different environments. The other part of a vanity URL is the URL Pattern or Free Form entry. The URL Pattern is a rule defined for an entire asset type, while the Free Form entry is created individually by the content contributor for each asset.
Other important information about managing vanity URLs are provided in the following sections:
33.1 Generating Vanity URLs
Vanity URLs can be constructed in two ways. One way a vanity URL can be constructed manually, in a one-off manner by Content Contributors (see Working with Vanity URLs in Using Oracle WebCenter Sites ). The other method generates a vanity URL from a pattern, and is described in this section.
33.1.1 Configuring Auto-Generated URLs
Vanity URLs based on patterns are automatically generated for individual assets. After a pattern is registered, the vanity URL is generated when the asset is saved for the first time. Patterns can be created for every asset type; however, these patterns are only valid for a single site. The same pattern must be created for each site that shares the asset type.
While creating vanity URLs for assets, users edit the default vanity URLs of the assets and Oracle WebCenter Sites allows the creation of duplicate vanity URLs. Therefore, the auto generated URLs are changed to user generated URLs and users can decide if they want to delete the URLs, redirect them to another URL, and so on.
Changes to patterns are only processed when an asset is created or saved. If you modify a pattern or create a new one it only applies to assets created after the pattern is saved.
To configure an auto-generated vanity URL:
The URL Pattern Form opens.
The following characters are not allowed in the Name field: single quote (‘), double quote («), semicolon (;), colon (:), percent (%), ampersand (&), question mark (?), less-than sign ( ), and backslash (\).
Patterns defined will remain even if the asset type is later disabled for that site; however, the use of these URLs could result in a broken page.
The Subtype field for blobs do not show Any as an option for flex assets. The Subtype field for blobs do not appear for basic assets.
Selecting the Is Downloadable checkbox has the browser display a save dialogue when the vanity URL is accessed, instead of attempting to view the blob object within the page.
The Evaluate URL Pattern section of the form shows an example of what a pattern generated vanity URL will look like. It is recommended to evaluate the URL pattern before saving to validate your pattern.
If there is no asset of the given type then you cannot use this feature.
33.1.2 Working with WebRoots
WebRoots form integral parts of vanity URLs. WebRoots are required to distinguish between vanity URLs which have the same base URL, but are used for different environments, for example production, management, administrative, and so on.
The WebRoot is used to control how the vanity URL is interpreted. WebRoots are like assets. After it is configured, a WebRoot must be published to the destinations for it to work in delivery system.
WebRoots come in two forms: absolute and relative. An absolute WebRoot must contain the entire URL prefix (including host and port information), it may also optionally contain a PATH prefix, it is unique to every server. A relative WebRoot contains only information related to the PATH and does not contain any information on the host or port. Both URLs are handled identically by WebCenter Sites ; however, with relative WebRoot only a single WebRoot is required across multiple environments, for instance development, staging, and production environments. With absolute WebRoot each of these environments will have unique WebRoot.
To eliminate this limitation, the concept of VirtualRoot is supported. Using VirtualRoot requires setting an environment identifier ( sites.environment ) in the wcs_properties.json file to identify that they are valid for the given environment; if the parameter is missing then the WebRoot is used. It is important to determine and understand the types of WebRoots as you can have reason to have both absolute and relative roots defined at the same time.
The following table lists the advantages and disadvantages of these types of WebRoots.
Table 33-1 Advantages and Disadvantages of WebRoot Types
WebRoot Type | Advantages | Disadvantages | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Absolute Root URL. | Relative Root URL. | |||
---|---|---|---|---|
Using Only the Hostname | Using Both the Hostname and Prefix for the Path | Using the Hostname for a Mobile Site | Using | Using |
Production URL: http://www.example.com Complete vanity URL: http://www.example.com/Running/Home Production URL: http://www.example.com/Prefix Complete vanity URL: http://www.example.com/Prefix/Running/ Production URL: http://www.example.mobi Complete vanity URL: http://www.example.mobi/Running/Home Complete vanity URL: http:// / /example/Running/Home Complete vanity URL: http:// /Running/Home Root URL : This is the URL that is used to render the asset in other environments such as editorial, staging, and so forth. When first displayed, there is only one row for adding an environment and root URL. Additional lines of Environment and Root URL fields are added by clicking the Add New button. The virtual URL entered must have an absolute Root URL. The following table provides fields of the virtual URL that you need to populate: Table 33-3 Fields of Virtual URLs
|