Answer the question
In order to leave comments, you need to log in
Why is there two slashes at the end of the og:url for the main one?
Greetings, dear connoisseurs.
Site on MODX. Current version: 2.8.3-pl
Only recently I noticed, looking at the source code of the page, that two slashes were added at the end of the main page in the markup. I don't know where to dig to fix this.
Here's the thing in the source code of the page:
<meta property="og:url" content= "https://mysite.com//">
<meta property="og:url" content= "http://askmeplz.com/">
<meta property="og:url" content=https://mysite.com/https://mysite.com/">
Answer the question
In order to leave comments, you need to log in
I answer the question: “where is the dog buried?”
http://askmeplz.com/ returns a string from the system setting with the site_url key, if one is set. If not set, it takes the generated string from the config.inc.php file. You correctly understood that MODX_BASE_URL in your case (and for most sites) adds a slash to the end of the string.
returns a string with the page address formed according to the scheme specified in the system setting with the link_tag_scheme key. You can read more about this setting by following this link . It does not say only one thing that the main page will definitely have a slash. And this is correct, since when forming a link without a domain name for the main page, apart from the slash, nothing else remains.
If you want to keep the option that is in your answer, but also remove the slash at the end of the main page, then you can do this code:
<link rel="canonical" href="http://askmeplz.com/">
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question