Jump to content

Release: Redirects


apeisa

Recommended Posts

@Mike -  I have another set of redirects to setup for a list of blog posts. 

Currently the posts are setup as blog/year/month/day/title/

I am going to be redirecting to blog/posts/title 

Any way to mass redirect this ? Versus adding each individual post as a redirect?

Thanks.

Link to comment
Share on other sites

@Mike, your module is insanely amazing! Love it, I just switched to using your module for redirects. 

You saved me hours!! of inputting a bunch of redirects. 

I used the wild card. 

I set it up like this:

blog/{year:num}/{month:num}/{day:num}/{title:segment}/

going to 

domain/blog/posts/{title}/

and its working flawlessly!!!

  • Like 1
Link to comment
Share on other sites

@Mike, your module is insanely amazing! Love it, I just switched to using your module for redirects. 

You saved me hours!! of inputting a bunch of redirects. 

I used the wild card. 

I set it up like this:

blog/{year:num}/{month:num}/{day:num}/{title:segment}/

going to 

domain/blog/posts/{title}/

and its working flawlessly!!!

Glad you like it! :)

Your example can be made shorter, too: blog/{year}/{month}/{day}/{title}/

Should the {title} be name? Since it is used to form the URL? Just curios whether the module will convert it to name (haven't used it before)

The bits between the curly braces are just identifiers for types. There are no actual length limitations. You could swap title out with name, page, post, user, model, or entry, which all assume the type segment - these are known as Smart Wildcards. If you wanted to give it another name, such as postname, you'd need to define the type in the Source as well: {postname:segment}

As a recommendation, I'd also make the trailing slash optional, just to be sure. blog/{year}/{month}/{day}/{title}/?

Link to comment
Share on other sites

When you're Selecting a page to redirect to you're presented with the site tree.

I'd love to see an additional auto-complete field here too.

We have about 500 individual redirects to implement and it would drastically reduce our time. Is it on the roadmap or could it be?

Link to comment
Share on other sites

When you're Selecting a page to redirect to you're presented with the site tree.

I'd love to see an additional auto-complete field here too.

We have about 500 individual redirects to implement and it would drastically reduce our time. Is it on the roadmap or could it be?

Yeah, it did cross my mind for Jumplinks 2, but I may just implement it sooner. Reason being: Quite a bit of non-dev work going on at the moment, which is taking up a lot of my time. I'll try and do something this afternoon - probably will make it an option. Though, you say you'd love to see it as an additional field - why have both?

Link to comment
Share on other sites

 you say you'd love to see it as an additional field - why have both?

They satisfy different use cases.

If I don't know my page name but know where it's stored I will use the tree. Sometimes page names have changed.

Likewise, in reverse...

If I know the page name but not where it's located in the tree an auto complete field solves that

And even if I know where a page is located in the tree, on large trees manually locating 500 pages takes a long time.

Link to comment
Share on other sites

They satisfy different use cases.

If I don't know my page name but know where it's stored I will use the tree. Sometimes page names have changed.

Likewise, in reverse...

If I know the page name but not where it's located in the tree an auto complete field solves that

And even if I know where a page is located in the tree, on large trees manually locating 500 pages takes a long time.

Okay, so I'd use both fields (the auto-complete field would be off by default, and would be enabled in config), and the last one to have done an update - that is, the last one used - will fill the Destination field. Easy enough - will give that a shot now. :)

Link to comment
Share on other sites

My original comment referred to the Redirects Module though? Didn't realise there was a Jumplinks conversation here too.

Sure, that was your original. Now that I'm working on a new feature, it's better off in the Jumplinks thread.

Edit: My apologies - I'm not keeping tack of the conversation properly (I can be quite a scatter-brain sometimes)...

Nonetheless, I'm adding your suggestion to Jumplinks, and have asked for a little help on that thread.

I do agree with what you need though. Thing is, I don't think Redirects is being updated anymore.

Link to comment
Share on other sites

  • 1 month later...

I can’t add redirects for multi-language URLs. 

The default language of my site is German, and I have also added English (with the root /en/).

Wenn I add a redirect which should go from /test-bla-bla/ to /en/ and save it, the redirect gets saved as going from /test-bla-bla/ to /. The module seems to ignore every URL that starts with /en/.

Can someone help me please?

Link to comment
Share on other sites

I can’t add redirects for multi-language URLs. 

The default language of my site is German, and I have also added English (with the root /en/).

Wenn I add a redirect which should go from /test-bla-bla/ to /en/ and save it, the redirect gets saved as going from /test-bla-bla/ to /. The module seems to ignore every URL that starts with /en/.

Can someone help me please?

I haven't yet had a chance to play around with ProcessRedirects on multi-language sites, and so can't be sure why that is happening. Have you perhaps tried using Jumplinks?

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...

@Mike
Thanks for jumplinks. You did a great job. I like it.
I have some small remarks/ questions

  1. Why isn't it listet in PW Modules?
  2. Why doesn't it have its own support board in PW Forum. ProcessRedirect is another Module. I think its better to have one support board for each module, even if they are related.
  3. I would like to have an option to clear the 'HITS'.

EDIT
Just found it in the directory and even the support board: https://processwire.com/talk/topic/8697-jumplinks/

It isn't listet if I select modules by Modulauthor mikerockett

mikerockett or mike-rockett (better to merge)

I strongly recommend to unravel Support Board for ProcessJumplinks and ProcessRedirect. Maybe this post could be moved to Jumplinks Support Board too. (Hello Pete?)
 

Edited by kixe
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Hi,

I hope someone or this module can help:

After relaunch the URL changed from

www.shoppingwels.at/apotheken/apothekenkalender.php

to www.shoppingwels.at/apotheken/

The script from apothekenkalender.php is now inside PW (/site/...) and as /apotheken/ is in the PW-tree I can no longer link inside the Folder (is that really true? or can I change something in htaccess?). The Problem too is. this is a Service for pharmacy and the Drugstores want to iframe to this file. So I helped me and made the script twice in another Folder /apothekendienste/ which is not in PW.

But Google has the link (good SEO for me)

Apotheken-Kalender von Wels mobil
www.shoppingwels.at/apotheken/apothekenkalender.php
Bereitschaftsdienst der Welser Apotheken inklusive Gunskirchen, Buchkirchen und Marchtrenk. Alle Sonn- und Feiertags- und Nachtdienste.

So I tried in htaccess:

Redirect 301 /apotheken/apothekenkalender.php http://www.shoppingwels.at/apotheken/

but this will not work!

So what can I do to redirect from my old URL to /apotheken/ - thank you for helping

Link to comment
Share on other sites

  • 4 months later...

Hi,

have a problem with a redesigned homepage with 3 domains in (that is new) one multisite PW installation. To prevent 404 errors with old paths i have installed this module. It looks great and every thing seems to be ok - but it takes no effect. 

Are there any problems or (better) hints with multisite-installations?

Link to comment
Share on other sites

  • 2 months 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...