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

use relative urls based on the document root #20

Open
kaluzki opened this issue Feb 5, 2018 · 0 comments
Open

use relative urls based on the document root #20

kaluzki opened this issue Feb 5, 2018 · 0 comments

Comments

@kaluzki
Copy link

kaluzki commented Feb 5, 2018

Meanwhile we use relative urls in our shop environments relative_urls => true. IMO it could be the default behaviour.

But actually relative urls (without leading slash) don't work properly:

Loading the image

<img src="images/example.jpg">

from seo url http://shop/category/product.html instead of http://shop/index.php?id=<id> will end up in 404 Not Found http://shop/category/images/example.jpg

Possible solution

https://github.com/vanilla-thunder/bla-tinymce/blob/3abd1dbeb8ff26e31ebf1c2e9c3f456c36f2cd19/copy_this/modules/bla/bla-tinymce/application/core/blatinymceoxviewconfig.php#L196

return (tinyMCE.activeEditor.settings.relative_urls) ? "/" + tinyMCE.activeEditor.documentBaseURI.toRelative(url) : tinyMCE.activeEditor.documentBaseURI.toAbsolute(url);
@kaluzki kaluzki changed the title use relative urls based on the document use relative urls based on the document root Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant