RewriteEngine On RewriteCond %{HTTPS} on RewriteCond %{HTTP:X-Forwarded-Proto} https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteRule ^index.php$ / [QSA,R] RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{REQUEST_URI} http://%{HTTP_HOST}%/surfing-$1 RewriteRule ^surfing-([0-9]+)$ /content/c-surfing-id.php?id=$1 [L,QSA]
RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{REQUEST_URI} http://%{HTTP_HOST}%/surfing-$1 RewriteRule ^surfing-([0-9]+)$ /content/c-surfing-id.php?id=$1 [L,QSA]
RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^surfing-([0-9]+)$ /content/c-surfing-id.php?id=$1 [L,QSA] RewriteCond %{REQUEST_URI} http://%{HTTP_HOST}%/surfing-$1