My site/shopping cart becomes unavailable after making Search Engine Setting changes in Newtek Cart

Ecommerce Web Hosting for Developers and Webmasters

If your website and/or shopping cart becomes unavailable after making changes to Search Engine settings in Newtek Cart, you will need to make a minor change to the /content/admin/admin_settings_search.php file within your Newtek Cart installation.

How to Fix it

1.  Go to the root of your cart installation and then locate the content folder, then the admin folder, then the admin_settings_search.php file.

2.  Open the file with your preferred text editor, and make the following change to line 23:

Old line 23:  $rewriteBase = $pi["dirname"];

New line 23:  $rewriteBase = ‘/’;

Why this happens

When you make a change to the Search Engine settings in Newtek Cart, an .htaccess file is created so that your cart has the ability to generate SEO friendly URL addresses for each page on the shopping cart.

However, in some cases, the code on line 23 in the admin_settings_search.php file will write the following to the .htaccess file every time you make changes to Search Engine settings:

RewriteEngine  On

RewriteBase      \

RewriteRule^products/([0-9a-zA-Z\_\-]*)\.htm([l]?)$index.php?p=product&product_code=$1&%{QUERY_STRING} [L]

RewriteRule^catalog/([0-9a-zA-Z\_\-]*)\.htm([l]?)$index.php?p=catalog&catalog_code=$1&%{QUERY_STRING} [L]

RewriteRule^pages/([0-9a-zA-Z\_\-]*)\.htm([l]?)$index.php?p=page&page_id=$1&%{QUERY_STRING} [L]

RewriteRule^index\.htm([l]?)$index.php?p=home&%{QUERY_STRING} [L]

RewriteRule^site_map\.htm([l]?)$  index.php?p=site_map&%{QUERY_STRING} [L]

The second line in the .htaccess example above (in bold) is the error that is causing the problem.  The backslash, "\", needs to be a forward slash, "/", instead.

This occurs because the variable $pi["dirname"]; in the admin_settings_search.php file writes a backslash into the file instead of a forward slash (which would actually be correct if your site was hosted on a Linux environment, but since the Newtek Cart is currently only available on Windows shared plans, this will create a problem).

For additional help, or if you experience any further issues, please contact the technical support department.

Add Feedback