uwap.RedirectPlugin 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package uwap.RedirectPlugin --version 1.0.1                
NuGet\Install-Package uwap.RedirectPlugin -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="uwap.RedirectPlugin" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add uwap.RedirectPlugin --version 1.0.1                
#r "nuget: uwap.RedirectPlugin, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install uwap.RedirectPlugin as a Cake Addin
#addin nuget:?package=uwap.RedirectPlugin&version=1.0.1

// Install uwap.RedirectPlugin as a Cake Tool
#tool nuget:?package=uwap.RedirectPlugin&version=1.0.1                

RedirectPlugin

Plugin for WebFramework that adds simple static redirects.

Website: https://uwap.org/projects/redirect-plugin

Changelog: https://uwap.org/changes/redirect-plugin

Main features

  • Creating static redirects as files

Installation

You can add this plugin to your WF project by installing the NuGet package: uwap.RedirectPlugin

You can also download the source code and reference it in your project file.

Once installed, add the following things to your program start code:

  • Add <code>using uwap.WebFramework.Plugins;</code> to the top, otherwise you have to prepend it to <code>RedirectPlugin</code>
  • Create a new object of the plugin: <code>RedirectPlugin redirectPlugin = new();</code>
  • Map the plugin to a path of your choosing (like any/r): <code>PluginManager.Map("any/r", redirectPlugin);</code>

You can do all that with a single line of code before starting the WF server:<br/><code>PluginManager.Map("any/r", new uwap.WebFramework.Plugins.RedirectPlugin());</code>

Plans for the future

  • Different redirect folders for different instances of the plugin in case there are multiple
  • Web interface to manage (create and delete) redirects with an API, either to manage the files or replacing the files altogether

Usage

To create a redirect from <code>[mapped path]/[redirect path]</code> to <code>[target]</code>, create a new file <code>../Redirects/[redirect path].txt</code> (you can also create subfolders) and enter <code>[target]</code> as the content.

Currently, all instances of the project use the same folder for their redirects. The redirects are stored in memory during runtime and updated by the worker.

Example: After mapping the plugin to <code>uwap.org/r</code> and creating a file <code>../Redirects/test.txt</code> containing <code>https://github.com/pmpwsk</code>, visitors will be redirected from <code>https://uwap.org/r/github</code> to <code>https://github.com/pmpwsk</code>.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1.2 119 3/3/2024
1.0.1.1 170 11/19/2023
1.0.1 147 9/15/2023