Help with .htaccess file for Ecwid shop site

Hi @rojharris,

I’ll have the other cleaner type of URLs as an option implemented into the Ecwid Customizer very soon, probably today or tomorrow. I can send you a pre-release version as soon as I have it ready, if you’d like to test it…? That way you don’t have to change your whole store design.

1 Like

No rush @Ricardo… I’ve had to jump onto a rush animation job so I won’t be getting to the shop until Monday now. Many thanks though!

Pushed out version 1.1.0 of Ecwid Stacks. This is another important upgrade to improve the SEO friendliness of the Ecwid Store links. This is an advanced feature that requires editing the .htaccess for the website, to add some “server rewrite rules”. If the advance clean URLs option is selected, warnings and some instructions are displayed when in edit mode. In most cases, it should work with the .htaccess rewrites displayed by the stack in edit mode. If things don’t seem to work, it may mean that additional custom editing of the .htaccess file is required. In this case, unless you can figure out the exact server rewrite rules needed, I suggest that this option be disabled.

Cheers,

Ricardo

Hi Ricardo,

Hope you are well.

We are launching our first Ecwid store and want to have clean URL’s.

I have read this chat and would like to clarify something please.

I use .php rather than .html for my index file name.

So my pages file names are all index.php (see screenshot)

In your 'Enable Advanced Clean URLs" the .htaccess has shop/index.html

I have my store on a number of pages as we have categories with their own pages.

So on this example page the folder name is ‘on-sale’ with ‘index.ph’


My question is for the .htaccess
Can the “Store page name:” be ‘on-sale/index.php’?
And what path do I use for “Store folder path” do I use this? draft1.floorsdirectaustralia.com.au/on-sale/

This is the draft website that will be going live shortly.
www.draft1.floorsdirectaustralia.com.au
Ecwid stacks are on 4 pages - Flooring>Hybrid, Flooring>Laminate, Flooring>Engineered, and On Sale pages.

We were only going to setup the 'Enable Advanced Clean URLs" .htaccess on the final site…not on this draft site. But I want to check how to do it so we can get setup once the final site is ready.

Thanks for your help.

Cheers Scott

Hi Scott,

If the ‘on-sale’ folder is right off the root folder, then this should be the setting that would work:

Screen Shot 2020-09-20 at 1.27.35 AM

Cheers,

Ricardo

Hi Ricardo,
Great thanks. I’ll give that a go during the week once we go live with the final site.
I’ll let you know how it works out.
Cheers Scott

1 Like

Hi Ricardo,

We have published our site but have a quick question please as we have Ecwid store on a few pages in categories.

https://www.floorsdirectaustralia.com.au/floors-on-sale/
https://www.floorsdirectaustralia.com.au/flooring/hybrid/
https://www.floorsdirectaustralia.com.au/flooring/laminate/
https://www.floorsdirectaustralia.com.au/flooring/engineered/
https://www.floorsdirectaustralia.com.au/flooring/accessories/

So my question is…What url path should I use in the .htaccess file??

Also what is the result of clean urls?? Please see the screenshot.

Many thanks
Scott

Hi,

I have a problem with ECWID,

The site, with cleaned url’s is here, but if you go to any product and then reload the page you’ll get a 404…

https://monsite123.best/shop/

Does anyone know how to configure .htaccess so that it does what the github article says and remaps any shop url to the actual shop page?

Roger, I saw that on your site “Nina Harris Artist Shop” it works perfectly.

Can you help me or tell me the code to embed in the .htaccess file to make it work properly.

Looking forward to your help.

Thanks for any help

Cyril

Hi @CYRIL ,

Not sure why that’s doing that… Have you checked the PHP version on your host?

The code for my .htaccess file is:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f  
RewriteRule ^shop/.*$ /shop/index.php

ErrorDocument 404 https://ninaharris.co.uk/error/	

Hope that helps. If not I’m sure @Ricardo will be able to help.
Roger

Hi @rojharris,

Thanks for your reply.

I will test your .htaccess file to see if it works with my site.

Thanks again.

Cyril

Hello Cyril,

Are you using the Ecwid Stacks?

Hello @CYRIL,

To use clean URLs you need not only to edit the .htaccess file, but also add some javascript code to your website, or use the Ecwid Stacks which includes all the code for that and makes it all much easier.

Here is a link that can help you with that if you are not using the Ecwid Stacks:

Cheers,

Ricardo

Hi @Ricardo ,

Thanks for your reply and help.

I am not using the Ecwid stack at the moment.

I will look at the article and add the javascript code to make it work properly.

I will also look at the stack Ecwid and the options it offers.

Thanks again

Cyril