I have a page like this index.php?controller=a&action=b
, but on this page controller=a
i did nothing, if i access it just a blank page. I need to redirect from controller=a
to original page controller=a&action=b
?
What if just check the page url and redirect,
if(isset($_GET['controller']) && $_GET['controller'] == "a"){
header("location: index.php");
}
Your question is confusing... i will try my best to help, here's a site that might help you:
https://www.htaccessredirect.net/
Another suggestion that might help in .htaccess is the following:
RewriteRule ^controller/([0-9A-z_-]+)\/action/([0-9A-z_-]+)\/$ index.php?controller=$1&action=$2 [QSA,L,NC]
this way you might use link www.domain.com/controller/a/action/b/ to access index.php?controller=a&action=b