Hey there, i just installed ISP3 on my new Server(Debian6) and so far everything is running fine, but while setting up my sites, i came across a small problem. I want one of my sites https only. http requests should be redirected to https. https works without problems, bit i cant find a way to redirect http to https or disable http for that site at least. i allready tried to use the isp redirect settings for my domain with the result of an endles redirect i even tried to add a redirect block with the config option to add custom directives to nginx vhost config but that does not work as the block would be after the actual vhost block and so never matched as the block itself matches :/ so: is there a way to disable http or redirect http -> https? thanks in advance
Perhaps something like this in the .htaccess at the root of your website: ----------------------------------------------------------------- RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L] -----------------------------------------------------------------
Hey webguyz, thank you for your reply. but as i have written, i'm using nginx as webserver so there is no .htaccess support
Oops. Keep forgetting that about nginx. Must be why I use Apache, for compatability with the rest of the world Good Luck!
Use this in the nginx Directives field: Code: if ($scheme != "https") { rewrite ^ https://$host$request_uri? permanent; }