Skip to content

Conversation

andrewkett
Copy link
Contributor

When turning on signed urls all assets were returning 404s with the nginx sample file. This was because static.php returns 404 when in production mode so we can't fall back to that, and there is nothing set up in the default nginx config to reroute these urls.

This rewrite redirects all urls like /static/versionxxxx/ to the /static directory. I believe that this is what the /static/.htaccess file already does for apache.

@gordonknoppe
Copy link
Contributor

+1, people continue to have issues with this because of copying the provided nginx configuration, see #2326

@vrann
Copy link
Contributor

vrann commented Nov 12, 2015

Thanks for contribution,
internal ticket is created MAGETWO-45446

@vrann vrann added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development improvement PS labels Nov 12, 2015
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why limit to a location block and not always strip version ? Then the code would become:

rewrite ^/static/version\d*/(.*)$ /static/$2;

@vtransy
Copy link

vtransy commented Jan 3, 2020

@ghost
Copy link

ghost commented Jan 3, 2020

@vtransy unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request

1 similar comment
@ghost
Copy link

ghost commented Jan 3, 2020

@vtransy unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants