Log In - destination is wrong
Asked by Simo Suurla:

Hi, I have following difficulties in logging in trough "Ask question" button:

image2015-2-25 13:40:15.png

Here is how this happens:

image2015-2-25 13:30:59.png

Here is source code of the destination of the "Log in" -button

image2015-2-25 13:29:33.png

It seems that somehow the corrupted:

```
&lt;a class="aui-button cq-login" href="/login.action?os_destination=%252Fquestions" tabindex="0"&gt;Log in&lt;/a&gt;
```

Any Ideas how to fix this? We are running Confluence 5.7 and Questions 1.1.47 on linux.

[](https://community.atlassian.com/t5/Questions-for-Confluence/Log-In-destination-is-wrong/qaq-p/196363?attachment-id=3238){#link_115e9282fe9935}  
[](/tnckb94959/attachments/tnckb94959/questions-for-confluence-questions/594/1/image2015-2-25%2013%3A29%3A33.png){#display_115e9282fe9935_0}  
[](https://community.atlassian.com/t5/Questions-for-Confluence/Log-In-destination-is-wrong/qaq-p/196363?attachment-id=3239){#link_115e9282fe9935_0}  
[](/tnckb94959/attachments/tnckb94959/questions-for-confluence-questions/594/2/image2015-2-25%2013%3A40%3A15.png){#display_115e9282fe9935_2}  
[](https://community.atlassian.com/t5/Questions-for-Confluence/Log-In-destination-is-wrong/qaq-p/196363?attachment-id=3240){#link_115e9282fe9935_1}  
[](/tnckb94959/attachments/tnckb94959/questions-for-confluence-questions/594/3/image2015-2-25%2013%3A29%3A9.png){#display_115e9282fe9935_4}  
[](https://community.atlassian.com/t5/Questions-for-Confluence/Log-In-destination-is-wrong/qaq-p/196363?attachment-id=3241){#link_115e9282fe9935_2}  
[](/tnckb94959/attachments/tnckb94959/questions-for-confluence-questions/594/4/image2015-2-25%2013%3A30%3A59.png){#display_115e9282fe9935_6}


Answers:
author: Simo Suurla
body: Finally got working work around:

#Fix invalid url in login trought Ask question -button.  
AllowEncodedSlashes on  
RewriteEngine on  
RewriteRule \^/(.)questions$ /questions \[R\]  
[](https://community.atlassian.com/t5/Questions-for-Confluence/Log-In-destination-is-wrong/qaq-p/196363?attachment-id=9005){#link_115e928937dd9b}  
[](/tnckb94959/attachments/tnckb94959/questions-for-confluence-questions/596/1/image2015-2-25%2014%3A2%3A10.png){#display_115e928937dd9b_0}

comments: author: Dominik Budde
body: I have the same behaviour. Confluence is not running behind an Apache so that I don't see the possibility to put the rewrite code of Simo Suurla in any configuration file.

It is a really confusing behaviour.

Do I really have to configure an Apache to rewrite the mistaken url ?


author: Dominik Budde
body: This issue is logged under <https://jira.atlassian.com/browse/CQ-1813>

I upvoted this one.


author: Nic Brough -Adaptavist-
body: Hmm. Is the base url in Confluence set correctly?

comments: author: Simo Suurla
body: It seems to be right.


author: Nic Brough -Adaptavist-
body: Ok, that's the easy one confirmed, just needed to rule that out as a problem.Two more questions1) Are you sure questions is installed and activated ok? Could you try <https://conflu-test> kela fi/questions and see if that does take you to questions (Note that I removed some dot from the url to avoid any robots picking it up and spamming you)2) Are you running it behind Apache?


author: Simo Suurla
body: Yes, I think installation is fine because everything else is working. If I am logged in already there is no problem.Yes, we are running this behind Apache. But I have not noticed this kind any ware in Confluence before.


author: Nic Brough -Adaptavist-
body: Ahh, that's not quite what I was going for, but I have seen problems with redirects in Apache doing that. I think I found it was a broken redirect when I ran into it, but I'm sure there were other ways to configure apache to get it wrong!


author: Simo Suurla
body: ProxyPass / <http://localhost:8090/>ProxyPassReverse / <http://localhost:8090/>#also tried this but did not help..Redirect /%2Fquestions <https://conflu-test.kela.fi/questions>\</VirtualHost\>