This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

mittul
mittul

I have created one virtual host in my local server .. say it as demo.mywebsite.com and made my all the changes using static pages and uploaded few images on the fly from editor in static pages this is working fine.

Now as soon as I uploaded on my test server,somewhere athttp://testserver.com/mywebsite, I m unable to see the images which I had uploaded on my local server.

When I firebug it, I come to know that image paths showing something like this /storage/app/media/myimage.png and if I change from firebug from /storage/app/media/myimage.png to storage/app/media/myimage.png (removed first character, which is a forward slash) then its working fine.

So there must be storage file location issue or related to .htaccess.

Hence I updated my .htaccess from RewriteBase / to this RewriteBase /mywebsite/ but it did not work. I also tried to play with removing and appending forward slash and so on but nothing worked for me.

I also went at config\cms.php

'storage' => [        
               'uploads' => [
                   'disk'   => 'local',
                   'folder' => 'uploads',
                   'path'   => '/storage/app/uploads',
               ],        
                'media' => [
                   'disk'   => 'local',
                   'folder' => 'media',
                   'path'   => '/storage/app/media',
               ],    
    ],

And tried to update path value in both media and uploads array from '/storage/app/media' to something like 'regency_cms/storage/app/media', or '/regency_cms/storage/app/media',.

But these did not work either.

Can someone guide me how we can deal with this scenario without updating my static pages code manually for each and every page.

Any help will be highly appreciated.

Thanks

islamboulila39870
islamboulila39870

Hi, Did you find a solution for this? i have the same problem and i tried many things that didn't work.Any help please,Thanks

mateuszgrzywna64397
mateuszgrzywna64397

i have added dot before storage and is working now

before: 'path' => '/storage/app/uploads', after: 'path' => './storage/app/uploads',

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.