The first case is not working. Getting error “This page isn’t redirecting properly. Server is redirecting the request fo thsi address in a way that will never complete”
Have you bothered to look at the sticky posts here? How about the tutorial linked in my signature?
Okay, let me comment on your code:
RewriteCond %{HTTP_HOST} ^example\\.com$
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
# Fine! Force www on the domain name
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
# Fine! Force the use of the secure server
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# This is the problem as %{HTTP_HOST} could still be
# example.com which would cause a loop
# BEGIN WordPress
[COLOR="Red"]<IfModule mod_rewrite.c>
# ARGH! This severely abuses your server! Do NOT use this wrapper![/COLOR]
RewriteEngine On
[COLOR="Red"]RewriteBase /
# Unnecessary[/COLOR]
RewriteRule ^index\\.php$ - [L]
[COLOR="Red"]RewriteRule ^.*shop/images/(\\d+)/?\\??(.*)$ /wp-content/plugins/shopp/core/image.php?siid=$1&$2 [QSA,L]
# No! You're trying to examine the {REQUEST_URI} in
# this RewriteRule and that will NEVER happen![/COLOR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
[COLOR="Red"]</IfModule>
# see above[/COLOR]
# END WordPress
Redirect 301 /ed-other.html https://www.example.com/other.html
# This will happen first because mod_alias is part of Apache's core.
# What happens to other.html is dependent upon whether it exists (-f) or not.