|
9 | 9 | - Supports headers on redirects |
10 | 10 | - Regex Redirects |
11 | 11 | - Imports and Exports |
| 12 | +- URI Query String Stripping |
12 | 13 |
|
13 | 14 | ## How to Install |
14 | 15 |
|
@@ -56,6 +57,48 @@ php artisan vendor:publish --tag=alt-redirect-config |
56 | 57 |
|
57 | 58 | In the `headers` property, you can provide an array of headers to be passed to the `redirect` method. |
58 | 59 |
|
| 60 | +### Query String Stripping |
| 61 | + |
| 62 | +This is a new feature we've added to remove query strings from URIs before they're processed by the redirect middleware. |
| 63 | + |
| 64 | +Because redirects are URI-based, an unexpected query string on a link would've cause your redirects to not function. |
| 65 | + |
| 66 | +With this feature, you can strip out troublesome query strings so your redirects work as intended. |
| 67 | + |
| 68 | +The Query Strings functionality can be found in the nav as a child underneath the Alt Redirect Addon |
| 69 | +``` |
| 70 | +- Alt Redirect |
| 71 | + - Query Strings <--- |
| 72 | +``` |
| 73 | + |
| 74 | +On this page you can manage the query strings you wish to strip, simply : |
| 75 | +- add the key of the query string `( eg 'foo' for ?foo=bar )` |
| 76 | +- Select your site |
| 77 | +- Hit save |
| 78 | + |
| 79 | +You'll see your query string in the list. |
| 80 | + |
| 81 | +#### Defaults |
| 82 | + |
| 83 | +We've provided a few default query strings that will be stripped. |
| 84 | +They're added as regular items when you install the addon. |
| 85 | + |
| 86 | +If you don't want / need these, simply delete them! |
| 87 | + |
| 88 | +#### Artisan Command |
| 89 | + |
| 90 | +We have provided an Artisan command to force the creation of defaults. |
| 91 | + |
| 92 | +This will "force" create them, so they'll be installed even if the defaults have already been installed. |
| 93 | + |
| 94 | +This is great for if you've deleted the defaults but want them back or if composer didn't install them during the addon install for some reason. |
| 95 | + |
| 96 | +Simple run the command below and confirm when it asks you too : |
| 97 | + |
| 98 | +```bash |
| 99 | +php artisan alt-redirect:default-query-strings |
| 100 | +``` |
| 101 | + |
59 | 102 | ## Questions etc |
60 | 103 |
|
61 | 104 | Drop us a big shout-out if you have any questions, comments, or concerns. We're always looking to improve our addons, so if you have any feature requests, we'd love to hear them. |
|
0 commit comments