Hi there,

There are a special settings I should fix to allow this module works in a page with both protocols activated (http and https)? In a single page with 'http' it works fine, but in other with both actives doesn't works.

Thanks for your support.

Regards,

Comments

dave reid’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -http, -https

Could you clarify? I don't understand what the problem is.

mediaformat’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Category: Support request » Feature request
Status: Postponed (maintainer needs more info) » Active

I think I had the same issue.

On my site authenticated users must be logged-in over https, site is http for anon. users.

When adding or editing a redirect, protocol was automatically set to https, so for example automatic redirects for changed aliases are written over https, but result in 404s over http.

I added $conf['https'] = TRUE; to settings.php

Perhaps it could be more explicit in documentation.

mediaformat’s picture

The unfortunate side effect of this dependency on mixed-mode $conf['https'] = TRUE; is that we now have mixed sessions.

I am wondering if the redirects could not be protocol agnostic to begin with, or selectable?

It seems to me that mixed-mode, is about something altogether different (session sharing), than differentiating which protocol to assign to the redirect.

I am tempted to file this as a bug!

But perhaps it is a configuration issue on our part... anyone else experience this?

mediaformat’s picture

Category: Feature request » Support request
Status: Active » Closed (works as designed)

I ended up setting $base_url = 'http://example.com';

Note: For js/css files to come through over https, when base_url is set to http, add a hook_process_html to your custom admin theme, or in a custom module. Ref: http://stackoverflow.com/questions/19202449/change-drupal-7-compiled-css...

mediaformat’s picture

Title: protocol https and http » protocol agnostic redirects
Component: Documentation » Code
Category: Support request » Bug report
Status: Closed (works as designed) » Active

So after more extensive testing, it seems setting base_url is not feasible.
It seems if base_url is not set the module uses the current url protocol.

In a secure case that would be httpsonly work over https

dave reid’s picture

What is the use case for the redirect? To redirect to an internal URL or an external URL?

mediaformat’s picture

Internal urls.

Basically editors will modify titles and/or aliases, triggering the Automatic redirects on alias change. We noticed many 404s, and found this to be the source. The redirects only exist on https.

dave reid’s picture

Hrm, I'm pretty sure that the "auto create redirects when aliases change" functionality should create just internal, protocol-less redirects. Redirect shouldn't even care if the current URL is HTTP or HTTPS, it should match redirects on both.

mediaformat’s picture

I've just tested the Automatic redirects on alias change again, and can confirm that redirect does NOT match both http and https.

IMO, Auto redirect on alias change should be protocol agnostic.

There may be cases where adding a redirect manually, one would wish to select between [both, http, https] as is possible with language, but that would be a feature! ;-)

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Can you paste in the database records for the specific redirects that are problems? I'm puzzled as there is no logic in redirect's "find which redirect matches the current path" code that would take the current protocol into account.

mediaformat’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Ok, after looking into the db records, and some testing. It seems to be working normally.