[SOLVED] Image upload path incorrect on nested pages

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
bastiaan789
New Member
New Member
Posts: 6
Joined: Thu Jul 18, 2013 8:29 pm
Location: Amersfoort, The Netherlands

[SOLVED] Image upload path incorrect on nested pages

Post by bastiaan789 »

When I add an image to a content block in a nested page (like "http://www.mydomain.com/page1/page-nr-two") the images are not loaded correctly because the image path is set incorrectly.

Images are referenced as: "http://www.mydomain.com/page1/page-nr-t ... -image.jpg"

The correct path should be: "http://www.mydomain.com/uploads/images/my-image.jpg"

What am I doing wrong?

- It is a clean install of 10.11.7 onto a new domain.
- Using MicroTiny or TinyMCE makes no difference
- Pretty URLs are on ($config['url_rewriting'] = 'mod_rewrite';)
- Copied the contents of docs/htaccess.txt into a .htaccess file in my site root

Thanks in advance!

Bastiaan
Last edited by bastiaan789 on Fri Jul 19, 2013 8:36 am, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Image upload path incorrect on nested pages with pretty

Post by velden »

When you use the {metadata} tag it will by default add a <base> tag that will take care of that.

http://docs.cmsmadesimple.org/tags/core/metadata-tag
bastiaan789
New Member
New Member
Posts: 6
Joined: Thu Jul 18, 2013 8:29 pm
Location: Amersfoort, The Netherlands

Re: Image upload path incorrect on nested pages with pretty

Post by bastiaan789 »

Thanks! That did the job!
Locked

Return to “[locked] Installation, Setup and Upgrade”