I have found the following while searching it is the only one i can
get working with my config setup
to send a 301 permanently if “/index.php” is directly accessed.
if ($request_uri ~* ^(/home(/index)?|/index(.php)?)/?$)
{
rewrite ^(.*)$ / permanent;
}
Thanks for suggestion appa, i apply what said to try and results in
a “Redirection Loop”.
Hello,
I have found the following while searching it is the only one i can
get working with my config setup
to send a 301 permanently if “/index.php” is directly accessed.
if ($request_uri ~* ^/index.php(.)$){
rewrite ^(.)$ / permanent;
}
The above resuls as which dose the 301 moved permanently with the
exception of retaining the the question and the the value.
I guess from a search engines point of view its see’s the 301 Moved
Permanently so in that case it ok, but it would be nice to not retain
the “?randomvalue”.
http://www.example.com/index.php?randomvalue 301 Moved