Hi,
i have problems with preparing two rewrites since i fall to a loop when trying to solve if.
-->1. rewrite is external (301)
http://www.example.org/index.php?my_page --> http://www.example.org/my_page
http://www.example.org/index.php?p=my_page --> http://www.example.org/my_page
-->2. then execute actual php (internal)
http://www.example.org/my_page --> http://www.example.org/index.php?p=my_page
I have tried:
location ^~ /index.php {
if ($args = "my_page")
{
rewrite ^.*$ "http://www.example.org/my_page?" permanent;
}
}
rewrite ^/my_page$ /index.php?my_page last;
------
Internal works just fine, but with external i fall in inf loop.
What is real solution?????