-1

Possible Duplicate:
Apache rewrite rules and DNS settings for HTTPS sites

I have just added a SSL sertificate to a site, and the site should only answer on https. People that visit http should be sendt to https.

I hope this can be solved with .htaccess

if a user is typing in www.domain.no it should automatically be https://www.domain.no. This have to happen if the administrator is visiting the manager too, because if the manager is logging in with http the cache is cleared and the https doesnt show correctly (looks like it lacks css). Accessing the manager is done on like this: www.domain.no/manager

This is how my .htaccess file is like today:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Rewrite domain.no -> www.domain.no -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.domain\.no [NC]
RewriteRule (.*) https://www.domain.no/$1 [R=301,L]

1 Answers1

0

Update: The solution was to add this after the original .htaccess file:

RewriteCond %{SERVER_PORT} !=443
RewriteRule (.*) https://www.domain.no/$1 [R=301,L]