apeisa Posted December 5, 2014 Author Posted December 5, 2014 benbyf, see from here: https://processwire.com/talk/topic/148-release-redirects/?p=78798 1
renobird Posted December 5, 2014 Posted December 5, 2014 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) The * at the end is a wildcard. 7
benbyf Posted December 8, 2014 Posted December 8, 2014 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/*
Mike Rockett Posted December 8, 2014 Posted December 8, 2014 @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. 3
renobird Posted December 8, 2014 Posted December 8, 2014 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* 1
Ivan Gretsky Posted December 25, 2014 Posted December 25, 2014 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. 1
Mike Rockett Posted December 25, 2014 Posted December 25, 2014 @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.) 2
Mike Rockett Posted December 25, 2014 Posted December 25, 2014 Don't want to open up a new thread about this small issue: Why is that if I define an admin page in the module's info, it won't delete at uninstall-time?
apeisa Posted December 25, 2014 Author Posted December 25, 2014 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! 1
Nico Knoll Posted December 25, 2014 Posted December 25, 2014 @mike: Not sure where you defined it but normally you have to create and delete admin pages manually in the ___install() and ___uninstall() functions (Example: https://github.com/NicoKnoll/ProcessTemplateEditor/blob/master/ProcessTemplateEditor.module#L264-L311) Edit: maybe I missed an Ryan-update and there is an easier way now.
Mike Rockett Posted December 26, 2014 Posted December 26, 2014 @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... 1
Mike Rockett Posted December 26, 2014 Posted December 26, 2014 Ah! My bad - didn't move parent::___uninstall() over when I started again... lol 1
Nico Knoll Posted December 26, 2014 Posted December 26, 2014 This only works for Process-Modules, doesn't it? 1
apeisa Posted December 26, 2014 Author Posted December 26, 2014 Nico, sure - no reason to work with others. Process modules are what admin pages use. 1
Nico Knoll Posted December 26, 2014 Posted December 26, 2014 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 ) 2
Mike Rockett Posted December 26, 2014 Posted December 26, 2014 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...
Nico Knoll Posted December 27, 2014 Posted December 27, 2014 Well for me it works with just having parent::init() ... (I updated ProcessLogs today for example: https://github.com/NicoKnoll/ProcessLogs)
Mike Rockett Posted December 27, 2014 Posted December 27, 2014 I'll investigate further to see what may be happening on this end... (There's a slight chance I may be deluded - but on the chance that I'm not, I'll double check what happened.)
kongondo Posted December 27, 2014 Posted December 27, 2014 (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 December 27, 2014 by kongondo 1
Mike Rockett Posted December 28, 2014 Posted December 28, 2014 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"); }
Mike Rockett Posted December 30, 2014 Posted December 30, 2014 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?
Mike Rockett Posted January 2, 2015 Posted January 2, 2015 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.
Mike Rockett Posted January 2, 2015 Posted January 2, 2015 (edited) (Removed) Edited January 23, 2015 by Mike Anthony 2
Mike Rockett Posted January 3, 2015 Posted January 3, 2015 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now