Skip to content

use relative urls based on the document root #20

@kaluzki

Description

@kaluzki

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions