Hi,
Alex wrote:
I've already asked this question on a number of apache forums and
have
received no response. I hoped someone here could help me understand
why this rewriterule doesn't work:
RewriteRule ^/index.php\?option=login$ /register [R=301,L]
I think you may be caught by RewriteRule not matching
against query strings. Per the docs:
What is matched?
...
* If you wish to match against the hostname, port,
or query string, use a RewriteCond with the
%{HTTP_HOST}, %{SERVER_PORT}, or %{QUERY_STRING}
variables respectively.
Source:
https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#what_is_matched
I believe you want to use something like:
RewriteCond %{QUERY_STRING} ^option=login$
RewriteRule ^/index.php?$ /register [R=301,L]
It's been a while since I've done this, so I'm not sure
whether the "?" after index.php is matched. You may need to
adjust that pattern.
--
Todd