Forum Moderators: phranque
From here:
http://example.com/index.php?page=pay
to:
[example.com...]
I've tried a couple basic expressions like:
RewriteRule ^index.php?page=pay$
But the rule seems to hang up at the "=" sign... tried to escape that with /, but that did not work.
You will also need another RewriteCond to check %{SERVER_PORT} for NOT 443 in order to prevent this rule from being applied to requests that *are* made on https -- resulting in an infinite loop.
Finally, your rule must have a destination URL and some flags. It should look like this:
RewriteRule ^(index\.php)?$ https://example.com/ [R=301,L]
Links to the mod_rewrite documentation, a regular-expressions tutorial, and other resources are available in our Forum Charter.
Jim