DARKF3D3 Posted October 30 Share Posted October 30 Hi, I created a self hosted cdn configuring a subdomain that point to the same folder as the prestashop installation of the main domain. From PS b.o. "Media servers" page (Advanced paramenters >> Performance) I wrote the subdoman url. Now css and js files are served correctly by the self hosted cdn, but the images are not showed up. The url of the images seem to be correct, but result in 404 error. Any idea on why this happens? Link to comment Share on other sites More sharing options...
Nickz Posted October 31 Share Posted October 31 (edited) What kind of permission is set at the cdn? What Presta version you are running? What theme are you using? Update history if done before. Edited October 31 by Nickz (see edit history) Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 31 Author Share Posted October 31 @Nickz I'm PS8.1 with classic theme. The cdn has been created simply ading the subdomain in Plesk, setting it's root directory the same as the main folder of PS. Link to comment Share on other sites More sharing options...
przemex Posted October 31 Share Posted October 31 In the administration panel Preferences - Traffic disable Friendly URL and Save, delete the .htaccess file via FTP on the server and then re-enable Friendly URL in the admin panel + save and delete the store's temporary files, reload the browser with the Ctrl+Shift+R button Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 31 Author Share Posted October 31 Thanks@przemex, your suggestion pointed me into the right direction to fix the issue. Into htaccess file I had these rules for www redirect that interfered also with the subdomain. Once removed images showed up correctly RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Link to comment Share on other sites More sharing options...
przemex Posted October 31 Share Posted October 31 That's why I wrote about it, if a new .httacess file was generated it would automatically be corrected and not everyone can edit code, my method is easy and simple, anyway it's great that the problem was finally solved. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted October 31 Author Share Posted October 31 Yes, your solution would certainly have been quicker, but unfortunately I cannot deactivate friendly urls on my site because In past I customized some urls using a module, which I tehn removed. So if I deactivate friendly url, then I wont be able to activate them again, because some settings are not accepted by PS. Link to comment Share on other sites More sharing options...
Nickz Posted November 1 Share Posted November 1 15 hours ago, DARKF3D3 said: So if I deactivate friendly url, then I wont be able to activate them again, because some settings are not accepted by PS. if you don't mind me asking, its obvious for me that one shop is not ideal. Why not opening other shops where you have not to doctore around that much? You can test different approaches. And its not that expensive, below 100 US you get a domain plus VPS, or shared host. Link to comment Share on other sites More sharing options...
Mediacom87 Posted November 1 Share Posted November 1 Hi, If I understand correctly, you've created a sub-domain on the same hosting server, pointing to exactly the same place as the store's main domain name. Since the advent of the HTTP/2 protocol, there's no point in doing this, and it won't improve performance or referencing. You need to use a real CDN to benefit from several advantages, such as distribution closer to customers, resource-saving on the main server and options like image reprocessing, for example. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now