Redirect Problem

I am not sure how long this has been an issue, but recently we noticed that if you type our url in a browser without the www. then it redirects to our home page incorrectly.



This works fine if you do type in the www. The browser will redirect correctly to Paradise Cay - Wholesale Books, Gifts, Navigational Charts, On Demand Publishing.



But, if you omit the www. it points to www.paracay.com/store/store. It gives a 404 error, which is mildly annoying at best.



I never typr in the url myself, I use links, so I’m not sure if it’s been happening for longer than a week, but we only noticed it after we upgraded our hosting package with hostgator. I’m not sure if they did anything to the httaccess file, but I have asked them to look into ti and they have succeeded in breaking my site in various ways, but still no solution.



Any ideas?



I see that my redirects are working properly for the most part, so this is confusing to me.

check your .htaccess in case any redirects are in there

also not 100% but check config.local.php



for

Host and directory where software is installed on no-secure server



Host and directory where software is installed on secure server

If you're talking about the url in your signature then the problem is that it is redirecting to http://www.paracay.com/store/store which has nothing to do with the www but instead /store/store.

Thanks for the replies.



I've looked in the httaccess and config.local.php files, but see nothing strange in there.



Tool, the problem is that is only occurs if you omit the www. when typing in the url to a browser. IT's strange.



Hostgator got back to me today and said that it appears to be a software issue and to contact cs cart, so I guess we'll try that next

Post what you have for:



.htaccess

# RewriteBase /



config.local.php

// Host and directory where software is installed on no-secure server
$config['http_host'] = '%HTTP_HOST%';
$config['http_path'] = '%HOST_DIR%';

// Host and directory where software is installed on secure server
$config['https_host'] = '%HTTPS_HOST%';
$config['https_path'] = '%HOST_DIR%';

I appreciate your time in assisting with this.



EDIT

Please edit your previous post and remove the information. You posted sensitive information that should not be shown. I only wanted you to post what I showed in my previous post.



It looks like you are missing everything that is supposed to be in the .htaccess file as far as original code:

```php DirectoryIndex index.html index.php









AddEncoding gzip .gz

RewriteCond %{REQUEST_FILENAME} .(js|css)$

RewriteCond %{HTTP:Accept-encoding} gzip

RewriteCond %{REQUEST_FILENAME}.gz -f

RewriteRule ^(.)$ $1.gz [QSA,L]





.css.gz$>



Header unset ETag

FileETag None

ExpiresActive On

ExpiresDefault “access plus 1 year”





ForceType text/css

Header set Content-Encoding: gzip

Header set Cache-control: private





.js.gz$>



Header unset ETag

FileETag None

ExpiresActive On

ExpiresDefault “access plus 1 year”





ForceType text/javascript

Header set Content-Encoding: gzip

Header set Cache-control: private







Header set Access-Control-Allow-Origin "
"









RewriteEngine on

Please note that RewriteBase setting is obsolete use it only in case you experience some problems with SEO addon.

Some hostings require RewriteBase to be uncommented

Example:

Your store url is http://www.yourcompany.com/store/cart

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

Options -MultiViews



RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]



RewriteCond %{REQUEST_URI} ^api/(.)$ [or]

RewriteCond %{REQUEST_URI} .
/api/(.)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .api/(.)$ api.php?_d=$1&ajax_custom=1 [L,QSA]



RewriteCond %{REQUEST_URI} .(png|gif|ico|swf|jpe?g|js|css|ttf|svg|eot|woff|yml|xml)$ [or]

RewriteCond %{REQUEST_URI} store_closed.html$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.
?)/(.*)$ $2 [L]



RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php [L,QSA]





```



Your config.local.php values for http and https appear to be fine.

Sorry, I guess I accidentally posted the htaccess from the public_html folder.



The one in the cs-cart install folder is just like you posted, exactly.

I believe that I have solved this, finally.



Had to comment out this line in htaccess inside public_html folder…



#RewriteOptions inherit



Thanks again for the help

Note that I just discovered a bug that might apply to some sites that causes redirects.

The cart is not handling case sensitivity properly for additional storefronts.

I.e. MyStore.foo.com should be equivalent to mystore.foo.com.

If you set the storefront url's with upper case characters it will enter a redirect loop.

See bug:http://forum.cs-cart.com/tracker/issue-5315-url-machine-name-case-sensitivity-belive-all-versions/