Jump to content

Release: Redirects


Recommended Posts

Would be nice if this was supported in the core as well in the settings tab. I setup my redirects in there now and use the 404 logger module as that seems to cater for my current needs when rebuilding a site

  • Like 3
Link to comment
Share on other sites

On 6/20/2020 at 11:21 PM, cb2004 said:

Would be nice if this was supported in the core as well in the settings tab. I setup my redirects in there now and use the 404 logger module as that seems to cater for my current needs when rebuilding a site

yeah, core redirects would make sense, something that I can imagine seems common enough and can link in with the tracking of page url changes and redirecting.

not sure I understand how you're doing it, can you explain?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

Hey folks!

Just wanted to mention that ProcessRedirects 2.0.0 is now out. As far as I can tell it should fix most of the issues that have been reported here, as well as those reported via GitHub. This is a major update and the module now requires ProcessWire 3.0.112+ and PHP 7.1+, so please keep that in mind if and when updating ?

Here's a kind-of-a-changelog for this release from the PR that got merged earlier today:

  • Mechanism for keeping track of and updating database schema.
  • Various GUI updates, including more JavaScript based checks, the use of vex dialogs and ProcessWire panels (for redirect testing), and a brand new export view.
  • Support for wildcard redirects by adding special meaning to star symbol (/path-to-*/subpath/ etc.)
  • Proper CSRF checks.
  • Switch from MySQLi to PDO.
  • ProcessWire 3.x namespace (hence module version 2.x, this alone would be a breaking change.)

... and some overall updates and "modernizations".

In case anyone is wondering why update this module now even though we already have a very powerful alternative (Jumplinks), the thing is that this module still serves a purpose: it's super easy to use, and does what it needs to do — no more, no less. Powerful features can be a double-edged sword, as they also tend to increase complexity, at least to some extent. When it comes to "power users", Jumplinks is by far a superior tool, but for regular content editors who just need the occasional shortlink (or something similar), this module is often just the right fit.

Hope that makes sense. Anyway, I still have some relatively minor additions in mind that I'd like to add to the module (assuming that Antti thinks they are a good fit), but again, for the most part this module already does what it needs to. Power users will likely feel more at home with Jumplinks ?

If you find a bug or have a feature in mind that this module really needs to have, feel free to open an issue at the GitHub repository. Thanks!

  • Like 6
Link to comment
Share on other sites

  • 3 months later...

I have a problem with the redirects:

I have one redirect:
/site/be/en/ ->/projects/belgium/

But when I add another one like under, then I get error "The Redirect From URL already exists as a page path. Redirect not added. "

/site/be/nl/ -> /nl/projects/belgium/

Why is this?

Link to comment
Share on other sites

  • 1 year later...

Hi all. I've used this module loads of times but I'm having a problem now. I've imported a long list of redirects that I've grabbed from a sitemap.xml file. They imported fine and looked good. When I came back a few days later, many (if not most) of the 'redirect to' entries turned into 5 digits preceded by a carat character (^). See screen shot. I've tried a few times since, including pasting in the list in small chunks. Any idea what is going on?

Screenshot 2022-09-30 at 17.07.32.png

Link to comment
Share on other sites

  • 7 months later...

Most of the times I use redirects for temporary purposes, usually for short links that should change over time (for example, `https://mysite.org/conference-signup`). So it was important for me that this module could redirect with other status codes, mainly 302, instead of 301.

I haven't created any ProcessWire modules yet, but I decided to try and improve apeisa's module, and I got it to work like I wanted, so I thought I should contribute this to the community. I know I should make a pull request, but I'm not experienced in git yet and I have little time now, so the best I can do now is leave here the file for you to see if you want. I'm sorry for this.

I added a column "status" to the table process_redirects, like this:

`status` enum('301','302','303','307') NOT NULL DEFAULT '302',

I only used the status codes specified on the documentation for $session->redirect. In future I'd like to specify them in a constant or static property (not sure), and then use it to generate the options in the edit form.

I haven't bumped version, and I'm not sure how to procceed about updating the database schema.

Could you have a look, please?


  • Like 1
Link to comment
Share on other sites

  • 5 months later...
  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...