Closed (works as designed)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2014 at 20:48 UTC
Updated:
20 Apr 2016 at 18:01 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidCould you clarify? I don't understand what the problem is.
Comment #2
mediaformat commentedI 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.phpPerhaps it could be more explicit in documentation.
Comment #3
mediaformat commentedThe 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?
Comment #4
mediaformat commentedI ended up setting
$base_url = 'http://example.com';Note: For js/css files to come through over https, when
base_urlis set to http, add ahook_process_htmlto your custom admin theme, or in a custom module. Ref: http://stackoverflow.com/questions/19202449/change-drupal-7-compiled-css...Comment #5
mediaformat commentedSo after more extensive testing, it seems setting
base_urlis not feasible.It seems if
base_urlis not set the module uses the current url protocol.In a secure case that would be
httpsonly work over httpsComment #6
dave reidWhat is the use case for the redirect? To redirect to an internal URL or an external URL?
Comment #7
mediaformat commentedInternal 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.
Comment #8
dave reidHrm, 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.
Comment #9
mediaformat commentedI'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! ;-)
Comment #10
dave reidCan 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.
Comment #11
mediaformat commentedOk, after looking into the db records, and some testing. It seems to be working normally.