I just installed last(new) yet uploaded Redirect module located here https://ftp.drupal.org/files/projects/redirect-8.x-1.0-alpha1.tar.gz

As you can see i configured it to redirect non clean urls to clean ones. I also already have configured my aliases and they are working pretty fine in my lmultilanguage site.

I'm using the last drupal stable 8.0.6 version.

It seems all ok, but if i surf to node/28 my dirty url is not redirected but is shown.

I'm doing something wrong here? Please help.

CommentFileSizeAuthor
redirect.png74.67 KBMatteo Tanca
alias.png13.81 KBMatteo Tanca
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larika created an issue. See original summary.

Matteo Tanca’s picture

Issue summary: View changes
Matteo Tanca’s picture

I reinstalled it and now is working for non clean to clean redirects. Thanks

Matteo Tanca’s picture

Status: Active » Closed (cannot reproduce)
kitikonti’s picture

Only as notice. I got the same problem an the same solution worked. In my case this was not a problem but on a big live site you have to delete all existing redirects to do this, which can be a problem.

kitikonti’s picture

Status: Closed (cannot reproduce) » Active

Ok i was a little bit too fast. The solution only worked on my dev environment not on my live site. Tried clearing cache, reenable module, enable/disable single function, but nothing worked.

caspervoogt’s picture

for me it only works with 'Redirect from non-canonical URLs to the canonical URLs.' enabled. However, I do not wish to enable this because I have some pages that are indeed aliases and should NOT be redirected. So I have lots of pages showing as /node/123 and not redirecting to their pretty URL.

Berdir’s picture

Priority: Critical » Normal

Don't really understand the last comment. Might be another duplicate of #2704213: "Redirect from non-canonical URLs to the canonical URLs" not working with language code in url, try the patch there to see if it solves your problem.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)
killes@www.drop.org’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.0-alpha4
Status: Postponed (maintainer needs more info) » Active

I am not sure, I have the same problem as the original poster, but let's see:

I have enabled:

Redirect from non-canonical URLs to the canonical URLs.

and

Set Content Location Header

I have not enabled

Enforce clean and canonical URLs.

because I do not want the urls to be cleaned.

I do not get a redirect from node/1234 to its alias (or elsewhere) (ie no Location header in the http response).

I also do not get a content-location header in the HTTP response header either.

In fact, it seems to me as if there is no code corresponding to the two selected options.

Phil Wolstenholme’s picture

If you've used previous versions of the module and have their config files hanging around then you may need to delete some old config options from the file. See https://www.drupal.org/node/2861578 where I had a similar issue.

killes@www.drop.org’s picture

Thanks, Phil,

my config file is

canonical: true
auto_redirect: true
default_status_code: 301
passthrough_querystring: true
warning: false
ignore_admin_path: false
access_check: false
content_location_header: false
langcode: de
route_normalizer_enabled: true

so I think it is ok.

I would like to change route_normalizer_enabled to false and content_location_header to true, but keep canonical on and actually have redirects.

bkosborne’s picture

I just scanned the code and I don't think "Redirect from non-canonical URLs to the canonical URLs." does anything at all. That may be the issue. Will open a separate bug report.

bkosborne’s picture

Berdir’s picture

Status: Active » Closed (duplicate)

Thanks, yes that option in the UI must be a leftover that we forgot to remove.

We unified the various different settings into a single unified feature because that's what core plans to do.

The original report here is a year old and no longer relevant, closing as a duplicate of the other related issues.