On 5/7/07, Ryan Huff <Ryan_Huff@xxxxxx> wrote:
I have this in my conf: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Now that code chunk kicks all :80 traffic to https (:443) .... I need a rule that will also kick http://www. Over to https:// If someone access the site by http://www.whatever.com, I want it to goto https://%{HTTP_HOST}%{REQUEST_URI}
If you only have one site, this is easy: RewriteCond %{HTTPS} off RewriteRule ^/(.*) https://example.com/$1 If you want to be fancy and handle all domain names the same way: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(www\.)?(.*) [NC] RewriteRule ^/(.*) https://%2/$1 (I'm assuming you're doing this in httpd.conf. To do it in an .htaccess would require a small adjustment.) Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx