# Do a redirect in the backend.

**URL:** <https://forum.shopware.com/t/do-a-redirect-in-the-backend/57254>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [3. Januar 2019 um 09:36 UTC](https://forum.shopware.com/t/do-a-redirect-in-the-backend/57254 "2019-01-03T09:36:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kabengwa](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kabengwa](https://forum.shopware.com/u/kabengwa)\
**Post date:** [3. Januar 2019 um 09:36 UTC](https://forum.shopware.com/t/do-a-redirect-in-the-backend/57254/1 "2019-01-03T09:36:20Z")

</div>

i have created a plugin in shopware and wanted&nbsp; it to create a document then redirect the user to the document for download purposes. i have realised that when i click on the docmunet link in the back end to view it it creates a url like this&nbsp;[http://localhost:8000/backend/Order/openPdf?id=mydocharsh](http://localhost:8000/backend/Order/openPdf?id=mydocharsh)&nbsp; so i wanted to know how i can achive the same thing using the $this-\>redirect()&nbsp;function. is this possible in the backend because i have used it before in the frontend and it worked well for me.

&nbsp;

this is the code is have for redirect.&nbsp; param just has the other half for the link (?id=mydocharsh) . so what could be the issue and what am i doing wrong … any suggestion is welcome.

```
    public function redirectToPdf($param)
    {
        $this->redirect(
          array(
            'controller' => Order,
            'action' => 'openPdf',
            'id' => $param,
          )
        );
    }

```

&nbsp;
