Jump to content

Regular Expression in URL


fsm

Recommended Posts

Hello

 

 

I am modifying my online shop code, and I wrote a php file at the root of my shop.

This is the code i wrote:

 

 <?php
require(dirname(__FILE__).'/config/config.inc.php');
Tools::redirect('index.php?controller=validacionusuario'.((count($_GET) || count($_POST)) ?
'&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, NULL, 'HTTP/1.1 301 Moved Permanently'
?>
 
This send me to my controller 'ValidacionUsuario', but I would like send some code in the url, something like http://myshop.com/index.php?controller=validacionusuario&code=mycode and access to 'mycode' in the controller.
 
Can I do that?
 
Thanks.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...