better-amp icon indicating copy to clipboard operation
better-amp copied to clipboard

wrong permalink in rel=alternate

Open depasco opened this issue 7 years ago • 1 comments

Hi support team,

my permalinks look like this: /%postname%/ with a closing trailing slash at the end. Your plugin does not add the slash at the end of the link rel="amphtml" href= url If the url of the page is https://www.domain.com/newpage/ your plugin inserts link rel="amphtml" href="https://www.domain.com/amp/newpage" which leads to a 404 error. I have a 301 force redirect for urls without trailing slash at the end in my htaccess but it's ugly and leads to 301 redirect if any bot crawls the site. Can you please fix this ? Many thanks...

Best Regards, Markus

depasco avatar Feb 07 '18 18:02 depasco

hello i have sam problem on my site you can check that https://www.masa-jaddah.com but i fix that error you have to go to this file on better-amp( better-amp/includes/functions/theme-functions.php ) and open it and go to line number 1100 you will see that replace with that and save the file the problem gone i wish i help you have a nice day

tarek-helish avatar Apr 25 '18 22:04 tarek-helish