Domain Alias / SSL problem, please help

I have a problem…



[url]https://www.domain.com/store/[/url]

and

[url]http://www.myotherdomain.com/store/[/url]



both redirect to:

[url]http://www.mydomain.com/store/[/url]



Great! … BUT…

[url]https://www.myotherdomain.com/store/[/url]

generates an error:



Error: Can’t write template cache in the directory: /var/www/vhosts/mydomain.com/httpdocs/gifts/var/compiled/customer.

Please check if it exists, and has writable permissions.



Backtrace:

File: /var/www/vhosts/mydomain.com/httpdocs/gifts/init.php

Line: 136

Function: fn_init_templater

File: /var/www/vhosts/mydomain.com/httpdocs/gifts/index.php

Line: 23

Function: require



The var directories all have 777 permissions and if I go to: [url]https://www.myotherdomain.com/store/store_closed.html[/url] I see the closed store sign, so there’s no problems with the certificate or host



I would be grateful of any help, I suspect it has something to do with htaccess sef rewrites.



Thanks