Comments (5)
Retour only works when the request goes through Craft. It's very likely that your Nginx setup does not route requests for static assets like images through Craft. This is pretty common for performance reasons, but it also means that your intended use-case will not work.
from craft-retour.
Would it be possible to detect if the asset the field is on isn't using local storage and, if so, set the redirect destination to the external asset URL? I only ask because setting up a static redirect from /path to works fine as a redirect.
from craft-retour.
Wait, you're saying the same exact thing works when not in a Short Link field? So the short link "alias" is the only thing not working in this case?
from craft-retour.
Yes, that's correct. If I'm on https://my-site.com
and go to Retour > Redirects and choose "New Static Redirect", I can set a path /my-path
, and a destination to the full URL of an external asset https://my-cdn.com/my-asset.pdf
, and then https://my-site.com/my-path
will correctly redirect to the external asset.
But if I have a Short Link field on the asset where I set /my-path
as the value, then https://my-site.com/my-path
will just redirect to https://my-site.com
.
from craft-retour.
Fixed in the above commits.
Craft CMS 3:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-retour": "dev-develop as 3.2.16”,
Then do a composer clear-cache && composer update
…..
Craft CMS 4:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-retour": "dev-develop-v4 as 4.1.17”,
Then do a composer clear-cache && composer update
…..
Craft CMS 5:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-retour": "dev-develop-v5 as 5.0.1”,
Then do a composer clear-cache && composer update
from craft-retour.
Related Issues (20)
- Automatically created redirects don't work if the base URL includes a path HOT 15
- Is it possible to disable all redirects temporarily? HOT 2
- Wrong `fileNotFoundUrl`in Dashboard HOT 5
- PDOException when url contains invalid UTF8 string HOT 5
- 404 data & redirect additions not displaying in control panel HOT 5
- Extra language parameter added HOT 1
- 410 Gone twig template HOT 6
- [Craft 3] One of retours migrations failed HOT 4
- Add logging of excluded patterns, and disallow empty patterns HOT 1
- Composer error when trying to upgrade to Craft 5 HOT 1
- Sort arrow is upside-down HOT 4
- Short Link field in table listing view causing error "Return value must be of type string, null returned" HOT 3
- Can't access plugin dashboard templates HOT 10
- Potentially valid redirects being deleted HOT 4
- Template Error When installing on Craft 3 HOT 1
- Integrity constraint violation errors being logged HOT 3
- Redirects list cached? Craft Cloud hosting. HOT 8
- 3.2.17 breaks website: Exception 'ParseError' with message 'syntax error, unexpected 'bool' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)' HOT 1
- URL gives 404 but is not logged in dashboard HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft-retour.