Question: In my web application, where presentation tier is in JSF, i want to have button
'back to previous page' on some pages. 

I'm making it through URL parameters:
`http://www.example.com/index.xhtml?backurl=value`

for example, in mange bean i set current page A.xhtml url:

```
public String showCourse(Course c){
    currentCourse = c;
    String currentUrl = FacesContext.getCurrentInstance().getViewRoot().getViewId();
    return "/B.xhtml?faces-redirect=true&backurl=" + currentUrl;
}

```

and at B.xhtml (with url `http://www.example.com/A.xhtml?backurl=A.xhtml`)
i have

```
<h:button value="Back to previous page" outcome="#{backurl}"/> 

```

which redirect me to previous page.

Everything works fine, but the problem is when i redirect from B.xhtlm page to C.xhtml page. I set `backurl` url parameter again. After go to C.xhtml page and come back to B.xhtml i lose previous `backurl` parameter - when i click to button i don't come back to A.xhtml page but to C.xhtml :(

Do you know beter why to do this ?

Answer: 
In **ps\_shop\_url** table you must set `domain=localhost`, `domain_ssl=localhost` & `physical_uri=/myProject/`

In **ps\_configuration** set `PS_SHOP_DOMAIN_SSL` & `PS_SHOP_DOMAIN` to `localhost` 

Also go at BackOffice -> Preferences -> SEO & URLs and click [Save] - this will regenerate your **.htaccess** file and will add the /myProject/ where needed.

That should be all.
A small addition to the answer provided by prestashop-developer-com

For Prestashop 1.6, you just need to change the table **ps\_shop\_url** following the recommendation from prestashop-developer-com