The issue I am facing is a very simple one which I can not find a solution to. I can do it with an IF statement but it will still not work completely like I want it to, the code for IF is like this
if ( $request_filename ~ supporttickets.php ) { rewrite https://<sitegoeshere>/addonmodules.php?module=TicketDepartmentBoxes redirect; }
This will work so when you goto
Site.com/supporttickets.php => Site.com/addonmodules.php?module=TicketDepartmentBoxes
but what I do not want is
Site.com/supporttickets.php?view&id=X => Site.com/addonmodules.php?module=TicketDepartmentBoxes
If I can somehow isolate so it stops after .php and does not also read into ?view... then IF can work, I tried something like
location ~ /admin/supporttickets.php$ {
rewrite ^ /admin/addonmodules.php?module=TicketDepartmentBoxes redirect;
}
This doesn't work it will redirect the "Tickets awaiting reply" link to the module, but once you click the links in the module to goto supporttickets.php?action&view=id it grabs it AGAIN and reroutes to the same module index.
anyone have any clue how I can isolate the regexp so the URL will end at .php and not catch the link if it has variables appended to it in Nginx