Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry/Exit pages have wrong URLs #1747

Closed
oparoz opened this issue Oct 1, 2010 · 13 comments
Closed

Entry/Exit pages have wrong URLs #1747

oparoz opened this issue Oct 1, 2010 · 13 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@oparoz
Copy link

oparoz commented Oct 1, 2010

Instead of having the nice hierarchical breakdown by folders, most of my entry/exit pages start with a slash (/) and are followed by the full URL
/http://mysite.com/folder

I have no idea why only a few work properly, but it could be related to another bug I filed where URLs in my piwik are encoded.

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

The encoding related ticket is #1746

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

I found out why all those URLs are wrong!

Only SSL URLs are properly displayed. The ones containing only http are preceded by a slash and shown in full.

It seems Piwik doesn't work properly when using secure URLs.

@robocoder
Copy link
Contributor

I re-read your comment and there's a contradiction in your last two sentences.

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

I apologize, the last sentence should read:
"It seems Piwik doesn't work properly when accessing the interface via a secure URL".

But I think I've found the problem and it has to do with the way it was installed.
There is an .htaccess in a folder above which does an automatic SSL redirection.

@robocoder
Copy link
Contributor

What does the rewrite rule look like? Maybe we can detect this case and avoid double encoding.

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

That would be great :)

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

@robocoder
Copy link
Contributor

I don't have access to my test box at the moment, but can you try using the 'NE' (noescape) or 'B' (escape backreference) flags? Something like:

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [NE,R,L]

or:

RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [B,R,L]

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

I've tried "NE", but it didn't work properly.

URLs looked good, but there was no information about the referer.

@robocoder
Copy link
Contributor

Is that conclusion based others visiting your site? (For your visits, you have to observe the 3rd case in http://piwik.org/faq/troubleshooting/#faq_51.)

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

I've visited a few sites that I track.
I've closed sessions.
As soon as the htaccess was gone, I could see the Google keywords.

With the .htaccess, the connexion made was always using SSL.

One way to avoid these kind of issues could be to have the management interface in a separate folder like /admin.

Another way would be for Piwik to be able to force an SSL connection to the management interface.

@robocoder
Copy link
Contributor

Forcing the UI to use ssl is covered by #1677.

IIRC, you can put the rewrite rule within a <Files>...</Files> container. In this way, you could make sure the redirect isn't applied to piwik.php.

@oparoz
Copy link
Author

oparoz commented Oct 1, 2010

Thank you very much for the quick answers.
I should have thought of <Files>...</Files> :S

@oparoz oparoz added this to the Piwik 1.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants