Download the PHP package bnomei/kirby3-redirects without Composer

On this page you can find all versions of the php package bnomei/kirby3-redirects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby3-redirects

Kirby Redirects

Kirby 5 PHP 8.2 Release Downloads Coverage Maintainability Discord Buymecoffee

Features

Installation

Setup: add Redirects section to Site blueprint

Add the plugin-redirects section to your site.yml. This will allow you to create redirects in via the Panel or programmatically.

site/blueprints/site.yml

[!TIP] If you want to able to set all HTTP Status code from within the panel, not just the 3xx range, you can use extends: plugin-redirects instead.

[!TIP] Instead of using the site blueprint you can also use the redirects section in any pages blueprint as long as you adjust the bnomei.redirects.map option accordingly so the plugin knows where to find the redirects.

Usage

In the Structure Field within the Panel add a Request-URIs fromuri, set a Response-URIs touri and a HTTP Status Code code like 301 or 302.

fromuri to code
projects/cool projects/changed-slug 301
projects/cool.html projects/changed-slug 301
projects\/.*\.html projects/changed-slug 301
some/broken-link https://exter.nal 301
blog\/(?P<year>\d{4})_(?P<slug>.*)\.html blog/$year/$slug 301

Shielding your website from attacks

This plugin will block 50+ routes/patterns of other popular CMS. It is enabled by default and will reduce the load on your website caused by bots/attackers looking for vulnerabilities found in other CMS.

You can track any redirects, including the blocked requests from the shield, using the redirect:before and 404:before hooks.

Hooks

This plugin will trigger the following hooks, which you could use to build your own tracking or logging.

site/config/config.php

Programmatically changing the redirects table

The site methods appendRedirects and removeRedirects allow you to programmatically change the redirects table (if stored in a Page/Site-Object Field, see map config option).

Cache & Performance

The plugin will cache any valid URI request and thus vastly improve performance on repeated requests to that URI. Thus the plugin will not check for redirects at all if it know that the URI will lead to a valid content page in Kirby. When the redirects table is changed or any content is updated via the Panel the cache will be cleared.

For best performance, set either the global or plugin-specific cache driver to one using the server's memory, not the default using files on the hard disk (even on SSDs). If available, I suggest Redis/APCu or leave it at file otherwise.

site/config/config.php

Similar Plugins

Settings

bnomei.redirects. Default Description
code 301
querystring true do keep querystring in request URI. example: https://kirby3-plugins.bnomei.com/projects?id=12 => projects?id=12
only-empty-results false only redirect if the result is empty in the router
map callback A closure to get the structure from content/site.txt. Define you own if you want the section to be in a different blueprint or skip the blueprint and just use code.
shield.enabled true Block various routes of other popular CMS

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.


All versions of kirby3-redirects with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
getkirby/composer-installer Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bnomei/kirby3-redirects contains the following files

Loading the files please wait ....