Help with htaccess

I need help with my .htaccess

That is what I see in it currently:

RewriteOptions inherit
RewriteEngine On

RewriteRule ^.*-p[\d]+$ %{REQUEST_URI}/../index.html
RewriteRule ^.*-c[\d]+$ %{REQUEST_URI}/../index.html
RewriteRule ^.*cart$ %{REQUEST_URI}/../index.html
RewriteRule ^.*search.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkout/.+$ %{REQUEST_URI}/../index.html
RewriteRule ^.*account/.+$ %{REQUEST_URI}/../index.html
RewriteRule ^.*pages/.+$ %{REQUEST_URI}/../index.html
RewriteRule ^.*signIn.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*resetPassword.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutAB.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*downloadError.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutResult.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutWait.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*orderFailure.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutCC.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutEC.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*checkoutAC.*$ %{REQUEST_URI}/../index.html
RewriteRule ^.*FBAutofillCheckout.*$ %{REQUEST_URI}/../index.html

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^/?$ “” [R=301,L]

I see code to do it here: Some generic htaccess redirects

Code recommended is this:

Force HTTPS and force WWW:

#  Force HTTPS and force WWW (this is a comment)
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301]

What do I do?
Do I erase everything that is already in place and replace with the code recommended?
Do I add the code recommended and keep in place what is already there?
Or something else?

And should I remove/change a file that is on my server now, or will this one (inside my rapid weaver project) overwrite what is on the server?

Thank you in advance

Here is my htaccess file that works fine for me to force https

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

and here’s the lines for force www:

RewriteCond %{HTTP_HOST} ^ [NC]

RewriteRule ^(.*)$$1 [L,R=301,NC]

Do you have any idea of what you were trying to do with all those RewriteRule's?

They’re kinda strange looking to me, for example:
RewriteRule ^.*cart$ %{REQUEST_URI}/../index.html
Will take any URL’s that end with “cart” and add an empty directory /../ and index.html.

So this url
would get redirected to

That’s technically an invalid URL as you can’t have an empty directory although browsers will ignore the empty directory.

So without knowing everything you want or wanted to do it’s hard to say what exactly to do.

You can only have one .htaccess file in a single directory. You can have multiple .htaccess files on a site, one per directory (folder). The directives are applied to the directory they are in and any child directory.

The RapidWeaver htaccess editor only reads and writes the htaccess file in the root directory (where the publishing path points). This would apply to the entire site.

  • So where(what directory) did you find this .htaccess file you are showing the snippets from?
  • Was it named dot htaccess (.htaccess)?
  • Do you have any idea where those directives came from and what they are supposed to do?

The generic code above works like a champ to force www and https, and does it in a single rewrite rule(pretty efficient) without changing a thing.

If that’s all you want to do then I’d probably rename the old htaccess file and replace it.

Hello Doug!

Thank you for quick answer!

The code that I’m showing is in Rapidweaver (publish edit).
Those lines refer to the ecommerce (Ecwid) that is embedded on the website. Thank you for explaining it all to me, I wasn’t sure if it is the actual code or some sort of a template that I’m supposed to make changes to. Sorry for my ignorance, I actually even didn’t know that file exists! So the code brings the person back to shopping page after the transaction. It was done for me by someone from Ecwid.

I did add the “force https and www” code, it all works now.

My site is this:

One more question.
I recall that I’ve read somewhere to put a code in that .htaccess file to allow google AJAX indexing. I’m trying to figure out the reason google is not picking up the micro data from products descriptions.
And also to that same point, stacks pages where Ecwid codes are embedded, should those pages be .html or .php? (For Ajax to work properly)

Thank you for your help!

Natasha Touchinski

AJAX is short for for "Asynchronous JavaScript and XML” so PHP shouldn’t come into play for that. You might need PHP for something else, most stacks that need PHP will force PHP extension.

I’ve never seen that before, not sure why’d they need something added to htaccess and wouldn’t know what it would be. Google has been using JavaScript rendered code for years. The fact that AJAX uses an XmlDataSource shouldn’t matter.

Why do you think google isn’t reading the descriptions? Have you checked what google has in its cache?

Hello Doug,

I’m not sure what exactly is going on.

I currently have Ecwid installed as an embedded HTML code on Rapid WeaverStacks pages as Default Categories (there are multiple Ecwid Categories displayed on multiple corresponding Rapid Weaver pages).

I encounter some issues with how this setup is showing up in Google Search Results, and I don’t know if it is due solely with the approach of embedding Ecwid store as Default Categories, or if there is something else missing in how I configured it, or in the code I’m using?

Please see files attached that explain all this with more details and screen shots, including Ecwid codes embedded.

My Ecwid ID is. 4212053

Website is

Thank you in advance,
Natasha Touchinski

(Attachment Microdata & page descriptions problem.pdf is missing)

(Attachment HTML for tea towel Olivia Multico.pdf is missing)

(Attachment codes inside my rapid weaver is missing)

(Attachment google search is missing)

Hi Doug,

I send you an email today, but could not attach some files (PDF). Is there a way?


Hi Natasha,

The forum software won’t allow attachments from email and has limits on what you can drag and drop onto the post screen.

You can drag and drop small things like screenshots,but you need to be on browser logged on to the forum.

For larger file sizes it would be best to place theme in a folder and use a file sharing service link Dropbox or Sync and them post a “shareable link” to the folder.

1 Like

Hello Doug,

Thank you for the replay,

I now looks like to me that the bulk of my questions are to be addressed to Ecwid side rather to the Rapid Weaver side.

One more question please regarding .htaccess file

1)How to make a redirect from a page that no longer exist (a product that used to be displayed on it is no longer made), and the page is now deleted from my site, to another page.
2) Page still exist, but was moved inside my site, so the previous URL is no longer valid

Thank you in advance

Without knowing the URL’s involved I can’t give you the exact rule, but here are some samples:
same site:

Redirect 301 /path/to/old/file/old.html /path/to/new/file/new.html

REdirect to a differnet site:

Redirect 301 /path/to/old/file/old.html

Thank you!

Hello Doug,

I’m wondering if you would have any advise for me on this:
I have Ecwid embedded as Default Categories on RapidWeaver stacks pages. There are multiple RapidWeaver stacks pages that display different Ecwid Default Categories.
I’m trying to figure out why meta tags of the RapidWeaver-made pages are applied to all Ecwid product pages (from the same Category). Google does not seem to be pulling the individual product descriptions from each Ecwid product page to make unique meta titles, descriptions and keywords. Any possible conflict between RapidWear and Ecwid integration here? I saw other people had this issue as well, but can not see a solution.Any idea how can this be fixed?

Thank you in advance,

Hi Natasha,

I’m no expert on Ecwid, but I had a look at your. store and product page. It appears that you are using a stacks page with plain html stack to instert the store.

So the home page has this as it’s description:

content="We offer French Jacquard & Acrylic Coated Cotton Tablecloths, Napkins, Runners, Pillows, & Tea Towels made by Tissus Toselli and L'Ensoleillade, Provence"

That looks fine.

Now If I hit the Shop now button I go to the shop by category page and I get

<meta name="description" content="- View All Products">

And I see a second description:

<meta name="description" content="Shop French Jacquard &amp; Acrylic Coated Cotton Tablecloths, Napkins, Runners, Pillows, &amp; Tea Towels from Tissus Toselli and L'Ensoleillade">

That technically is a syntax error as html5 only allows for a single <meta name="description" tag per page. I don’t know where this second description tag came from, and because there is only supposed to be a single tag there is no standard way for a search engine or any automated process to handle having two.

The only technical difference I see between this page and the home page is the addition of the shop cart widget.

So now I click on the coated table cloths and I see the same issue duplicate tags:

<meta name="description" content="- View All Coated Tablecloths">

and later in the html:

<meta name="description" content="Coated tablecloths are 100% cotton with acrylic coating making them wipeable. No washing is necessary! Use a wet cloth to clean and wipe off the spills.">

Now if I click on a product like Round Tablecloth “Bouquet” Cream, once again we have two descriotion tags:

<meta name="description" content="Coated tablecloth, 100% cotton with an acrylic coating. Wipeable, durable, fade and stain resistant. The stains won’t penetrate the fabric. No washing is necessary! Use a wet cloth to clean and wipe off the spills. Can be machine washed occasionally, mild detergent, no bleach, air dry. Iron on the…">

Followed by:

<meta name="description" content="Coated tablecloths are 100% cotton with acrylic coating making them wipeable. No washing is necessary! Use a wet cloth to clean and wipe off the spills.">

Now I don’t know where each one of these description tags are coming from, my best guess is the first one(the one I think matches the store) is coming from Ecwid. The second description is coming from the RapidWeaver page inspector field.

So again I don’t have Ecwid or know that much about it, but my guess would be to remove (Clear out) the RapidWeaver Descriptions on any pages that use Ecwid code. If you have an empty descrtion, RapidWeaver will not put any <meta name="description" tag and that way when Ecwid inserts on Google should pick up that one.

Hello Doug,

Thank you for help and the info! I would be never able to figure it out by myself. After you pointed it out, I figured that those second meta descriptions were in fact produced by Sitemap+, where I filled the “description” field. So I now removed them.

I’m wondering if I should delete meta descriptions that are in RapidWeaver pages also, but only those pages that have the Ecwid product widget installed. Because as it stands now, all meta descriptions of the rapidweaver “parent page" are showing in search results instead of individual titles and descriptions for products (filled in Ecwid). So far I did remove for 1 page only (tea towels), and resubmit it for google, but can not see if it did the trick yet.

Thank you in advance

If this helps, the description on the “tea Towel” page (w/o selecting a product) is

<meta name="description" content="Shop French Jacquard tea towels, we stock large selection of patterns &amp; colours, buy 3 or more and save up to $20.">

If I then select Tea Towel “Olivia” Multico, the description is:
<meta name="description" content="Bright colours, olives design. Double woven French Jacquard, 100% cotton, machine wash. Very absorbent, lint free. Won't shrink or fade in the laundry.">

And I don’t see the duplicates like before.

Now once Google re-scrapes your site(the last cache date was 9/15), there is, of course, no guarantee that Google will use those descriptions. The latest MOZ new-letter has a study showing Google disregards the page’s meta description 63% of the time.

Yes, the meta description for the Tea Towel “Olivia Multico” is the one that I made inside Ecwid. And it is the one I need to be shown as the corresponding to the individual product. Hope it will work!

Does this have something to do with Microdata as well? Ecwid say that " Ecwid uses microdata by to annotate product information and adds it to all store pages automatically. This product information appears in search results.**”

I can see it if I use the Rich Results Testing Tool (but no photo there for some reason?), but not in search results.

This URL:

Screen Shot 2020-09-26 at 2.49.52 PM.png

Screen Shot 2020-09-26 at 2.40.53 PM.png

When you add any structured data (like Microdata) technically, you are only “enabling special search result features and enhancements.

From Googles Search for Developers Reference on Products:

This page only explains how to make your products eligible to be shown on Google Search results and Google Images. To show your products as unpaid listings on the Google Shopping tab, you’ll need to provide a feed-through Google Merchant Center and opt into surfaces across Google. Learn more about the data and eligibility requirements.

From the Rich text testing tool, it looks like the page has valid structured data set up for a product. That’s good, but there is no guarantee that Google will “invoke” the unique enhanced display for a particular search.

The reason you don’t see an image of the enhanced results for products generally don’t show images. If you click the image tab on the SERP page, you might see the image.

Anyway, there is no way I know of to ensure an unpaid listing will show up. All you can do is have the Microdata there, run the rich test tool, and hope Google will start showing your products in an enhanced format.

Hello Doug,

Thank you for the explanation. I was actually thinking that I made something incorrectly. So far so good.

I have another strange issue that I can not figure out where it’s coming from.

I just realized that one of my Rapidweaver pages is not on the sitemap - on the Google Search console - it says “URL is known to google, not submitted in a sitemap”

I looked in the sitemap file, and the page is indeed absent from the sitemap. (the subpages of it are present)

I have all the settings checked (in rapid weaver)
General settings - show in navigation
Meta tags - enable robots meta tags - index this page - follow links

The page is this:

What could be causing this?


Hi Natasha,

I’m not at a Mac right now, but earlier in this post you mentioned sitemap+, if I remember there’s a setting in the page listing for showing the page on the sitemap.

I’ve never been a fan of the built in sitemap, because it doesn’t allow anything that isn’t in navigation to be in the xml sitemap.

Sitemap+ does a better job, but it still lacks the ability to show generated pages from things like poster stack, Armadillo or any external blog.

My go to has been Integrity Plus for sitemaps. It’s a extra external step, but it also checks for broken links on every link on every page.