<a href="www.mysite.com/index.php?information/adminpanel/<?php echo $id;?>" name="approve"
id="approve" ">Approve >></a>
When I am redirecting to this url it shows correct id in url but gives page not found error. I am new to cpanel. Please tell me is there any other way I can pass this id or how to route page in cpanel with uri segment.
Most probably you are missing a part in URL unless you have changed the routing in
.htaccess
file somehow.The right URL should most probably be (if you didn't change anything)
Note that the
controller/action
part should be sent as a part of query string under the variableroute
and that the ID variable has to be a part of query string as well under you name it variable that is then obtained from$_GET['younameit']
in your controller.The routing in OpenCart is done either via SEO URLs like
or even
while these are being translated by
mod_rewrite
rule intoor by non-SEO URLs where You need to specify the controller
where the default
index()
action ofCommonHomeController
is invoked or even by specifying the concrete action to be invoked as inwhere the
add()
action ofCheckoutCartController
is invoked. Because of this calling an URL likewould lead to trying to invoke the action
123()
within theInformationAdminpanelController
which most probably does not exist. Instead of this if you call URLit will be the
index()
action invoked while you can obtain thesome_id
value like this:Again - all described above is the default OpenCart routing behavior and will apply for your installation as well unless you have changed the
mod_rewrite
rules defined in.htaccess
file.