Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a domain http://services.mydomain.com which has a secure login through a secure central provider (https://secure.mydomain.com) on a different server with proxypass. When I go to the login page I am redirected to https://secure.mydomain.com/services. The application page is rendered fine but I get a 404 for all of the .css and .js files, as it is looking for https://secure.mydomain.com/services/style.css. The stylesheet is located at http://services.mydomain.com/style.css

I have managed to redirect the urls via apache rewrites but they now render as unsecure items on a secure page.

Here is the rewrite rule I have used:

RewriteCond %{REQUEST_URI} \.(gif|jpe?g|png|css|js|swf)$
RewriteRule ^/(.*)$ http://services.mydomain.com/style.css

Is there a way to redirect to these files through a secure url?

share|improve this question
add comment

1 Answer

You'll need to get your https service to serve the resources directly (without a redirect) if you want to get rid of the insecure resources warnings.

You should be able to accomplish this with a ProxyPass exception (a ! for the destination) and potentially an Alias to map to the files from the secure host; if you can provide your vhost configurations then I can be more specific about what is needed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.