RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301]
RewriteRule account/(.*) step2.php?package=$1 [L] # Do not use NC in a RewriteRule
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? page.php [L] # No need to specify DocumentRoot when you're in the DocumentRoot
RewriteCond %{THE_REQUEST} .+/index\\.php # Overly complex for no reason; require at least one char before index.php
RewriteRule ^(.*)index\\.php$ /$1 [L,R=301] # Why not display the DirectoryIndex? The reason for this baffles me.
That’s strange, indeed! There is nothing to redirect FROM step2.php IF (and only if) step2.php exists.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.domain.com$
RewriteRule .? http://www.domain.com%{REQUEST_URI} [L,R=301]
# Does not change {REQUEST_URI}
RewriteRule account/(.*) step2.php?package=$1 [L] # Do not use NC in a RewriteRule
# Will match account/Bronze and redirect to step2.php?package=Bronze
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? page.php [L] # No need to specify DocumentRoot when you're in the DocumentRoot
# Will not redirect step2.php to page.php IF (and only if) step2.php does not exist (as a file or as a directory)
RewriteCond %{THE_REQUEST} .+/index\\.php # Overly complex for no reason; require at least one char before index.php
RewriteRule ^(.*)index\\.php$ /$1 [L,R=301] # Why not display the DirectoryIndex? The reason for this baffles me.
# Ditto if {THE_REQUEST} and {REQUEST_URI} contains index.php, it will redirect but NOT if it's step2.php.