Use a different domain for SSL

Question

long time lurker – first time poster.

A client of mine has a website developed in CakePHP, and a wordpress blog installed in the /blog/ directory.

Let’s say the url of the main domain is http://www.realdomain.com, with the blog being http://www.realdomain.com/blog/.

They don’t have their own SSL certificate so they use my companies. Let’s say the secure URL is https://realdomain.maindomain.net/blog/

I have the following code in my wp-config.php file:

define('WP_SITEURL', 'https://realdomain.maindomain.net/blog');
define('WP_CONTENT_URL', 'http://www.realdomain.com/blog/wp-content');
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

When I go to the /wp-login.php, it redirects me to the secure URL which is perfect.

However, when I log in to the secure site, WordPress tries to loads JavaScripts and styles from

`http**s**://realdomain.com`

Which causes problems because the main site doesn’t have a SSL certificate and as a result doesn’t load anything from https://realdomain.com

Is there anything else I’m missing?

Is the solution a .htaccess rule?
A rule which routed all “https://realdomain.com” to "https://realdomain.maindomain.com“?

I’ll pay anyone $20 who can help me fix it. I’ve Google’d until my hearts content and I don’t know what else I can do.

Thanks so much!

0
Kingsley 3 months 0 Answers 7 views 0

Leave an answer