Jump to content

Recommended Posts

Posted

I have an as yet undocumented update to this module that will do that.

Here is the most current version

ProcessRedirects.zip

I've been using this version on a high traffic site for over a month, and it's solid.

You may have to use 2 rules (depending on what you want)

post-474-0-52596800-1417808936_thumb.png

The * at the end is a wildcard.

  • Like 7
Posted

Thats cool, but is there a set up to send /old-page/* to /new-page/* not just the root folder. I.e. all pages under /blog/* to /news/*

Posted

@benbyf - I don't think Tom did it that way. I do hope to get my module (which will fully support such redirects) up soon - still got a bit to do on it...

Sorry for the delay guys... I'm sure that there are a few people who need it. Will get to it as soon as I have the time.

  • Like 3
Posted
is there a set up to send /old-page/* to /new-page/*

Not currently, but it shouldn't be too difficult to add while Mike Anthony gets his version complete. I'm looking forward to his version myself—so long as I can specify my alt domain. *wink*

  • Like 1
  • 3 weeks later...
Posted

Finally got a chance to use this module. Thank you apeisa! I installed it on current stable (2.5.3) and tested probably every function. I can state it is compatible with PW 2.5. If someone else could confirm that, maybe it can be stated on module page, so people would not be scared off by compatibility problems.

@Mike Anthony: Patiently waiting for your new module. I was impressed by your Bolt redirect module satated functionality! When finished, your PW module should get almoast all use cases covered.

  • Like 1
Posted

@Ivan: Glad you like that one. :-) I'm going to try and work on the new module a little now. I have a feeling it needs to be re-written, but I'll decide shortly.

(Not a Christmas-person, so any form of work is not a problem - does feel good to have no obligations, however.)

  • Like 2
Posted

Finally got a chance to use this module. Thank you apeisa! I installed it on current stable (2.5.3) and tested probably every function. I can state it is compatible with PW 2.5. If someone else could confirm that, maybe it can be stated on module page, so people would not be scared off by compatibility problems.

I updated the module page, thanks for the heads up Ivan!

  • Like 1
Posted

@Nico - there is an easier way. One can now define the pages in the info, which can also be in a JSON file:

"page": {
    "name": "the-name",
    "parent": "setup",
    "title": "The Title"
},
 
So I know I can manually uninstall the page - but it should do this automatically. Haven't checked out the source though...
  • Like 1
Posted

Just add parent::init() to the init function. Then you don't need parent::install() and parent::uninstall() :) (I started updating my process modules with this new technique :))

  • Like 2
Posted

Nico, I really like that idea. Crazy simple.

But wait, before I do that - will it interfere with a conditional install? In other words, I'm checking to see if the original redirects module is installed before installing my module...

Edit: However, I've always used parent::init()... Didn't do the [un]install automagically...

Posted (edited)

I think the feature Nico is talking about was added in the dev branch a while back? IIRC...can't find a link atm... :-). To be clear parent::init() has been there for a while...what I am referring to is the 'uninstall' feature Nico is talking about...if memory serves me right!

Edited by kongondo
  • Like 1
Posted

I'm on the latest dev, but, for some reason, it didn't auto-[un]install. Here's the code of the init method in Process.php:

public function init() { 
	$class = $this->className();
	$info = $this->wire('modules')->getModuleInfo($this, array('verbose' => false)); 
	$version = (int) isset($info['version']) ? $info['version'] : 0;
	if(is_file($this->config->paths->$class . "$class.css")) $this->config->styles->add($this->config->urls->$class . "$class.css?v=$version"); 
	if(is_file($this->config->paths->$class . "$class.js")) $this->config->scripts->add($this->config->urls->$class . "$class.js?v=$version"); 
}
Posted

Quick one: I'm not fully sure how the hooks system works. Will there be conflicts with my module and the original if both are installed, and calling the same hook? I understand there's a priority attribute - does that mean they'll work comfortably together?

Posted

So I'm hacking away at the new module right now, and I need to ask if anyone needs the following features:

1. PassThroughs - keep the old url and serve content at a new url. I don't think anyone will need this, but I'd like to know if anyone does, and how important it is to them.

2. The ability to set HTTP Status Codes (301, 302, 307) on a per-redirect basis. I guess this is handy for temporary stuff, like for short URLs...

3. The ability to set a start and end date for the redirection

I guess that 2 and 3 go with one another. In other words, if I set a start and end date, the redirect should be 302. Am I right? If so, would number two be redundant?

Update - I'm not doing feature 1. Features 2 and 3 are being done, but the outcome of feature 2 will be determined what is set for feature 3.

Posted

Tom: Regarding Legacy Domains, do you think it may come in handy if we were to add per-redirect exceptions? Perhaps you want to keep a URL on your legacy domain, but if its accessed on the new site, you don't want to redirect to legacy. Yes?

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...