contao/import — Issue #3643: getReferer returns wrong value if Contao is installed in a subdirectory
Author: importer
Created: 2011-11-29 21:54:44+00:00
State: open
Labels: backend, Defect

as i described in the italian forum: http://contaocms.it/forum/topic/424.html

1) an installation of Contao is in a subfolder of the web root. /0/
2) a rewrite rule is enabled in order to hide the path /0 from the URL, the .htaccess file in the path / contains:

```

RewriteEngine On

RewriteCond %{HTTP_HOST} ^sitename.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.sitename.com$

RewriteCond %{REQUEST_URI}

![](^/0/

RewriteRule (.*) /0/$1

```

3) in the Back End the _relative path to the Contao directory_ is left empty, since we don't want to display /0 in the URL

)goback!

if these conditions are verified, then everything works fine, except that the **go Back** link in the backend points always to the same wrong path
This occurs only when the "go back" link is alone in the DIV tl_buttons (it doesn't occur in pages where there are together more links e.g.: Go back :: New element :: Edit multiple)
in my case the **go back** link of every page in the backend points to http://sitename.com/0/contao/main.php?do=settings

Another issue is that in the backend, some links contain the /0/ folder in the URL, and other links don't. Both work but it's strange thet links are not built all in the same way.

[Download the attachments](http://www.contao.org/tl_files/tickets/3643.zip "Download the attachments of this ticket")

--- _Originally created by aleppax on November 17th, 2011, at 04:44pm (ID 3643)_