Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nutrapharm_producto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cristian Mauricio Diaz Canales
nutrapharm_producto
Commits
4c055452
Commit
4c055452
authored
Nov 06, 2020
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Se agrega redireccion
parent
fcce45cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
app/config/routing.yml
app/config/routing.yml
+3
-0
src/AppBundle/Controller/DefaultController.php
src/AppBundle/Controller/DefaultController.php
+8
-9
src/NutrapharmBundle/Controller/DefaultController.php
src/NutrapharmBundle/Controller/DefaultController.php
+1
-1
No files found.
app/config/routing.yml
View file @
4c055452
...
@@ -2,3 +2,6 @@ nutrapharm:
...
@@ -2,3 +2,6 @@ nutrapharm:
resource
:
"
@NutrapharmBundle/Resources/config/routing.yml"
resource
:
"
@NutrapharmBundle/Resources/config/routing.yml"
prefix
:
/nutrapharm
prefix
:
/nutrapharm
redirect_inicio
:
path
:
/
defaults
:
{
_controller
:
AppBundle
:
Default
:
inicio
}
\ No newline at end of file
src/AppBundle/Controller/DefaultController.php
View file @
4c055452
...
@@ -5,17 +5,16 @@ namespace AppBundle\Controller;
...
@@ -5,17 +5,16 @@ namespace AppBundle\Controller;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Request
;
use
AppBundle\Lib\Utiles
;
class
DefaultController
extends
Controller
class
DefaultController
extends
Controller
{
{
/**
public
function
redirectHomeAction
(
Request
$request
){
* @Route("/", name="homepage")
$log
=
Utiles
::
setLog
(
'NutraPharmBundle\Controller\DefaultController:indexAction'
,
'nutrapharm/index'
);
*/
$ua
=
$request
->
headers
->
get
(
'User-Agent'
);
public
function
indexAction
(
Request
$request
)
$ip
=
$request
->
getClientIp
();
{
$log
->
debug
(
"Ingresando a redireccion de Nutrapharm... IP :
$ip
| UA :
$ua
...."
);
// replace this example code with whatever you need
return
$this
->
render
(
'default/index.html.twig'
,
array
(
return
$this
->
redirectToRoute
(
'nutrapharm_homepage'
,
[],
301
);
'base_dir'
=>
realpath
(
$this
->
container
->
getParameter
(
'kernel.root_dir'
)
.
'/..'
)
.
DIRECTORY_SEPARATOR
,
));
}
}
}
}
src/NutrapharmBundle/Controller/DefaultController.php
View file @
4c055452
...
@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\File\File;
...
@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\File\File;
use
Symfony\Component\HttpFoundation\StreamedResponse
;
use
Symfony\Component\HttpFoundation\StreamedResponse
;
class
DefaultController
extends
Controller
{
class
DefaultController
extends
Controller
{
public
function
inicioAction
(
Request
$request
)
{
public
function
inicioAction
(
Request
$request
)
{
$log
=
Utiles
::
setLog
(
'NutraPharmBundle\Controller\DefaultController:indexAction'
,
'nutrapharm/index'
);
$log
=
Utiles
::
setLog
(
'NutraPharmBundle\Controller\DefaultController:indexAction'
,
'nutrapharm/index'
);
$ua
=
$request
->
headers
->
get
(
'User-Agent'
);
$ua
=
$request
->
headers
->
get
(
'User-Agent'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment