url-design

When should I use a trailing slash in my URL?

别等时光非礼了梦想. 提交于 2019-12-27 10:34:47
问题 When should a trailing slash be used in a URL? For example - should my URL look like /about-us/ or like /about-us ? I am fully aware of the SEO-related issues - duplicate content and the canonical thing; I'm trying to figure out which one I should use in the context of serving pages correctly alone. For example, my colleague is thinking that a trailing slash at the end means it's a "folder" - a "directory", so this is not a correct style. But I think that without a slash in the end - it's not

URL structure for multi-language site

懵懂的女人 提交于 2019-12-20 02:50:57
问题 I want to make a multi-language site, but I'm not sure what the best way is to deal with the URL structure from a SEO point of view. Some examples: Product example.com/product/123/en/product-name or example.com/product/123/product-name/en Or other? Category example.com/Category/en/furniture/chair/ or example.com/Category/en/120/chair/ or example.com/Category/en/chair/ Or other? 回答1: (Ignoring the SEO aspect, as it’s off-topic on Stack Overflow.) Having the language tag as the first path

What's the difference between a URL such as “a.b.example” instead of “b.example/a”?

若如初见. 提交于 2019-12-18 09:52:25
问题 Why do some websites I see have a URL in the form a.b.example , and others are in the form of b.example/a ? For example, why is it gist.github.com instead of github.com/gist ? 回答1: These are different components . See section 3 of the URI standard for a list of components and their definitions. https://gist.github.com/ The authority (or more specifically, the host ) is gist.github.com . The path is / . https://github.com/gist The authority (or more specifically, the host ) is github.com . The

Should a Web site also be a Web resource?

橙三吉。 提交于 2019-12-06 02:06:16
问题 Every web application - every web site - is a service. (...) The features that make a web site easy for a web surfer to use also make a web service API easy for a programmer to use. Richardson and Ruby, "RESTFul Web Services" As I intend it, a Web site that is also a Web service provides multiple representations of its resources, depending on what the user-agent requests. The API, so-to-speak, is the Web site itself, and is not provided separately. This isn't the case for many popular "REST

Should a Web site also be a Web resource?

强颜欢笑 提交于 2019-12-04 07:58:57
Every web application - every web site - is a service. (...) The features that make a web site easy for a web surfer to use also make a web service API easy for a programmer to use. Richardson and Ruby, "RESTFul Web Services" As I intend it, a Web site that is also a Web service provides multiple representations of its resources, depending on what the user-agent requests. The API, so-to-speak, is the Web site itself, and is not provided separately. This isn't the case for many popular "REST APIs" out in the wild. Twitter's API, for example, is located at http://api.twitter.com/1/ , the '1' in

Menu path in Pathauto

痴心易碎 提交于 2019-12-03 05:38:36
问题 How do I get pathauto under Drupal 7 to generate a URL alias by the full menu path? 回答1: Just an update in case anyone comes across this with a more recent version of Pathauto/Token. This worked for me: [node:menu-link:parents:join-path]/[node:menu-link] 回答2: I ended up using: [node:menu-link:parent:url:path]/[node:menu-link] Heavy caution though: If the node does not have a menu link, you'll end up without an automatically aliased page. On the bright side, this might make you aware of orphan

Menu path in Pathauto

喜欢而已 提交于 2019-12-02 18:58:57
How do I get pathauto under Drupal 7 to generate a URL alias by the full menu path? Just an update in case anyone comes across this with a more recent version of Pathauto/Token. This worked for me: [node:menu-link:parents:join-path]/[node:menu-link] I ended up using: [node:menu-link:parent:url:path]/[node:menu-link] Heavy caution though: If the node does not have a menu link, you'll end up without an automatically aliased page. On the bright side, this might make you aware of orphan pages. (Consider it a feature!) Note that using the pattern: [node:menu-link:url:path]/[node:menu-link] will

URL structure for multi-language site

99封情书 提交于 2019-12-01 23:44:29
I want to make a multi-language site, but I'm not sure what the best way is to deal with the URL structure from a SEO point of view. Some examples: Product example.com/product/123/en/product-name or example.com/product/123/product-name/en Or other? Category example.com/Category/en/furniture/chair/ or example.com/Category/en/120/chair/ or example.com/Category/en/chair/ Or other? unor (Ignoring the SEO aspect, as it’s off-topic on Stack Overflow.) Having the language tag as the first path segment is the most common convention. And it makes sense, especially if you translate the path (which you

Best practice for URLs of multi-language websites

会有一股神秘感。 提交于 2019-12-01 16:38:52
What is considered the best strategy for URLs of translated websites? Something I see happen frequently is: http://example.com/english-slug.html http://example.com/de/english-slug.html http://example.com/fr/english-slug.html This has the (minor) advantage that a user can manually switch to another language by modifying the URL. The disadvantage seems to be that the URL consists of a slug in the wrong language for every page not in the default language. That would cause a SEO penalty, I think. The alternative would be to translate the slugs as well and optionally omit the language identifier as

What's the difference between a URL such as “a.b.example” instead of “b.example/a”?

我的未来我决定 提交于 2019-11-29 17:42:35
Why do some websites I see have a URL in the form a.b.example , and others are in the form of b.example/a ? For example, why is it gist.github.com instead of github.com/gist ? unor These are different components . See section 3 of the URI standard for a list of components and their definitions. https://gist.github.com/ The authority (or more specifically, the host ) is gist.github.com . The path is / . https://github.com/gist The authority (or more specifically, the host ) is github.com . The path is /gist . As https://gist.github.com/ would typically also have paths like the second URI (e.g.,