There must be something more going on than what you've shown us. Other htaccess or other configuration.

dklynn
—
2014-03-28T10:07:22Z —
#7

Z,

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.

Regards,

DK

Zaggs
—
2014-03-31T19:20:12Z —
#8

dklynn said:

Z,

That's strange, indeed! There is nothing to redirect FROM step2.php IF (and only if) step2.php exists.

Hi,

Sorry for the delayed reply.

I tried the latest code but now it's giving a 500 internal server error. Not sure whats wrong now...