Parked Domain Names Cs-Cart 4

I have a couple of domain names I have parked on my CS-cart 4 but if I try to go to one of the domains that isn't the main domain name I get “[color=#000000]No storefronts defined”[/color]



Does anyone know how I set it up so that the parked domain names resolves to the CS-Cart store as opposed to giving that error?



Thanks,

Doug

I think you will have to forward the parked domains to the main domain via your domain registers control panel rather than any setting in CS Cart.



Alan

Thanks for your reply Alan, I have the domains set up so that they 301 redirect to the main domain. THis is the way I always did it with Version 3 and it worked which makes me think it's a setting in CS-cart 4 I'm missing.

Can you give a clear example of the domains that are active in your cs-cart stores and the 301 redirects you are using?

Here is the main domain:



http://www.loveonlinefashion.ie



The store is closed as is under development but same happens when open



Here is the parked domain (parked domain in Cpanel):



http://www.loveonlinefashion.co.uk/



Thanks,

Doug

In your .htaccess file, inside the mod_rewrite section, add this right under the “options” setting:



RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]




So if you have www.otherdomain.com parked on your store site, it will redirect to www.domain.com.

That works for me… EXCEPT, now none of the sub pages load. If I put those 2 lines of code too high in the htaccess, it breaks the sub pages. If I put it too low in the htaccess code, it doesn't redirect to the new domain. Here is my .htaccess file:



================================================







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$>

ForceType text/css

Header set Content-Encoding: gzip

Header set Cache-control: private





.js.gz$>

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 [url=“http://www.yourcompany.com/store/cart”]http://www.yourcompany.com/store/cart[/url]

So “RewriteBase” should be:

RewriteBase /store/cart

RewriteBase /

Options -MultiViews



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



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)$ [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]



RewriteCond %{HTTP_HOST} !^www.garbrella.com

RewriteRule ^(.
)$ http://www.garbrella…pergolas.com/$1 [R=301,L]







==============================================



Here I have to last on the list and the sub pages load fine, but the domain rewrite doesn't work. If I move the 2 lines higher like under the “Options -Multiviews”… it redirects to the new domain fine, but none of the sub pages load. I am using SEO add-on and the domain “garbrella” A record points to our server, but is not using our nameservers therefore we can't park it in cpanel, but I don't think that really matters here.



Ideas?