Jump to content

(SOLVED) URL Friendly no CMS header image showing


doog_2019

Recommended Posts

Hello, 

As I said in a previous post,

I am a new user of prestashop and am building my first website. I use the last version of prestashop and I work in localhost with MAMP.

My problem: 

All my images work perfectly on my website BUTmy header in my CMS pages works only when I desactivate URL FRIENDLY. (See the photos)

 

What I already did: 

- Regenerated thumbnails

- Deleted .htacess and activated again URL  Friendly

- Changed the path for the images in /img/cms

PS: my headers are generated from my header.tpl where I added theses line: 

{if $page.page_name == 'category'}
<img src="themes/laber_outstock1/assets/img/ban_category.png">
   {/if}
    
    {if $page.page_name =='cms'}
<img src="themes/laber_outstock1/assets/img/ban_test.png">
{/if}

CMS PAGE WITH URL FRIENDLY ACTIVATED

cmsnoimageforum.thumb.jpg.9623025863ebd034d44d66f67c452c5a.jpg

 

CMS PAGE WITH URL FRIENDLY NOT ACTIVATED (So it works)

cmsimage.thumb.jpg.d354a60ffbb94bf245246071fd62cb28.jpg

 

My .HTACCESS on the root looks like:

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on


#Domain: localhost:8888
RewriteRule . - [E=REWRITEBASE:/www/test/]
RewriteRule ^api$ api/ [L]

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff
AddType font/woff2 .woff2
<IfModule mod_headers.c>
	<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$">
		Header set Access-Control-Allow-Origin "*"
	</FilesMatch>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /www/test/index.php?controller=404

Thank you for your help :)

 

Edited by doog_2019 (see edit history)
Link to comment
Share on other sites

Hi @Rodrigo B Laurindo, (I am back 😂),

 

If I open it in a new tab, there is an Error 404 and the URL is: http://localhost:8888/www/test/content/themes/laber_outstock1/assets/img/ban_test.png

 

"La page que vous cherchez n'a pas été trouvée" means "The page you are looking for has not been found."1326257472_Capturedecran2019-04-07a00_43_24.thumb.png.47cf06cb91085057502b4741dd8cce72.png

Do not hesitate if you need more screenshots :)

Link to comment
Share on other sites

Hi @Rodrigo B Laurindo,

The htdocs folder is just before "www": mamp/htdocs/www/test/content/themes/label_outstock1/....... :)

You are right, the url seems to be wrong because there is NOT the folder "content" after the "test" one :  www/test/content/themes/label_outstock1/assets/img/ban_testp.png

How can it be possible ?

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...