Giter VIP home page Giter VIP logo

pagepathhistorymanager's Introduction

Page Path History Manager Module for Processwire

Note: This module is not actively maintained and has not been tested with ProcessWire 3.x. If you think the functionality of this module is useful and you want to maintain it, please get in touch.

This modules allows you to easily manage past page URLs tracked with the PagePathHistory module.

It extends the settings tab on the page edit form in the backend and allows you to:

  • view past URLs of the current page and parent pages,
  • delete past URLs, and
  • create new fallback URLs.

Installation

  1. Install the module PagePathHistory from within the Processwire admin. PagePathHistory is included in core but not installed by default.
  2. Install this module from within the Processwire admin or copy the file content to /site/modules/PagePathHistoryManager.
  3. In Admin, click Modules → Check for new modules to refresh module directory. Afterwards install the newly registered module PagePathHistoryManager.
  4. You can now manage past URLs from within the settings tab when editing any page.

Handle non name-format characters

If you want to handle URLs with non name-format characters (all characters but -_.a-zA-Z0-9/~), i.e. to redirect content from a legacy website, you will need to modify your site's .htaccess file. By default requests to these URLs are directly redirected to the „Page not found“ page, you have to deactivate the directives responsible for this behavior.

Please remove or comment out the following lines:

# -----------------------------------------------------------------------------------------------
# OPTIONAL: Send URLs with non name-format characters to 404 page
# Remove this section if it interferes with URLs of any other software you may be running.
# -----------------------------------------------------------------------------------------------

RewriteCond %{REQUEST_URI} "[^-_.a-zA-Z0-9/~]"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?it=/http404/ [L,QSA]

… and these lines as well:

# -----------------------------------------------------------------------------------------------
# Ensure that the URL follows the name-format specification required by ProcessWire
# -----------------------------------------------------------------------------------------------

RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$"

You will only need to remove these lines, if you want to handle non name-format characters. If you're not sure whether you need it or not, leave it as it is.

License

The MIT License (MIT)

Copyright (c) 2015 Marc Löhe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pagepathhistorymanager's People

Contributors

bfncs avatar hagcin avatar

Stargazers

Emilio Añón Vega avatar Marc avatar Christoph Roeder avatar

Watchers

Carl  avatar James Cloos avatar  avatar  avatar  avatar

Forkers

hagcin

pagepathhistorymanager's Issues

create a fallback for an unpublished pages.

It's helpful to have unpublished content instead of deleting it. Just to have a record of that page, without moving it to the trash where it could be lost forever. If you unpublish content you can not create a redirect for that content because the page already exists.

"'The requested path is already in use by another page.'"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.