Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0][IMP][website_canonical_url] Safer, prefer root, relative paths #260

Merged

Conversation

yajo
Copy link
Member

@yajo yajo commented Sep 30, 2016

This patch makes this addon more SEO-friendly:

  • Includes a safety fix to avoid possible KeyError when no lang in context (could this ever happen? not sure, but preventing is easier).
  • Uses relative paths everywhere, so this works fine under any setup (HTTPS proxies, anyone?).
  • In case you visit /, and that gets rerouted to your homepage (/page/homepage by default), then we canonicalize / instead. This is better because it fits more what the user would type in the URL bar, and removes stop words from the indexed URL.

@Tecnativa

This avoids a possible `KeyError`.
Makes this work fine behind an HTTPS proxy.
@@ -10,7 +10,7 @@
'author': "initOS GmbH, Odoo Community Association (OCA)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include Tecnativa here

@yajo yajo force-pushed the 8.0-website_canonical_url-relative_safe_root branch from 1f210c7 to 1f947d5 Compare September 30, 2016 09:04
The root path canonicalized is more SEO and user friendly.
@yajo yajo force-pushed the 8.0-website_canonical_url-relative_safe_root branch from 1f947d5 to 6e64017 Compare September 30, 2016 09:14
@rafaelbn rafaelbn added this to the 8.0 milestone Oct 4, 2016
Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@pedrobaeza pedrobaeza merged commit 749ace3 into OCA:8.0 Oct 11, 2016
@pedrobaeza pedrobaeza deleted the 8.0-website_canonical_url-relative_safe_root branch October 11, 2016 09:05
yajo added a commit to Tecnativa/website that referenced this pull request Dec 19, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
yajo added a commit to Tecnativa/website that referenced this pull request Dec 19, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
yajo added a commit to Tecnativa/website that referenced this pull request Dec 21, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
pedrobaeza pushed a commit to Tecnativa/website that referenced this pull request Dec 24, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
yajo added a commit to Tecnativa/website that referenced this pull request Dec 27, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
yajo added a commit to Tecnativa/website that referenced this pull request Dec 28, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
yajo added a commit to Tecnativa/website that referenced this pull request Dec 28, 2016
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
reinka pushed a commit to reinka/website that referenced this pull request Jun 6, 2017
[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
reinka pushed a commit to reinka/website that referenced this pull request Jun 7, 2017
[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
reinka pushed a commit to reinka/website that referenced this pull request Jun 7, 2017
[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
reinka pushed a commit to reinka/website that referenced this pull request Jun 16, 2017
[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
reinka pushed a commit to reinka/website that referenced this pull request Jun 16, 2017
[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
simahawk pushed a commit to simahawk/website that referenced this pull request Apr 20, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
simahawk pushed a commit to simahawk/website that referenced this pull request May 11, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
simahawk pushed a commit to simahawk/website that referenced this pull request May 16, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
pedrobaeza pushed a commit to simahawk/website that referenced this pull request Jun 21, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
simahawk pushed a commit to simahawk/website that referenced this pull request Jun 28, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
HviorForgeFlow pushed a commit to ForgeFlow/website that referenced this pull request Oct 16, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
mfigueiredo-odoogap pushed a commit to odoogap/website that referenced this pull request Dec 5, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
pedrobaeza pushed a commit to odoogap/website that referenced this pull request Dec 14, 2018
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
cristinamartinrod pushed a commit to Tecnativa/website that referenced this pull request Feb 26, 2019
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
HviorForgeFlow pushed a commit to ForgeFlow/website that referenced this pull request Apr 23, 2020
…CA#260)

[IMP] website_canoncial_url: Several improvements

* Use safe method to retrieve lang.

This avoids a possible `KeyError`.

* Use relative paths.

Makes this work fine behind an HTTPS proxy.

* Prefer `/` over `/page/homepage`.

The root path canonicalized is more SEO and user friendly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants