Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Redirect Code needed #120

Open
Routhinator opened this issue Mar 6, 2016 · 0 comments
Open

Support for Redirect Code needed #120

Routhinator opened this issue Mar 6, 2016 · 0 comments

Comments

@Routhinator
Copy link

Hi folks,

This formula does many wonderful things, however it lacks the ability to control the type of redirect in the redirect.tmpl. Redirect by default uses code 302 (temporary), however in many cases these must be 301 (permanent) redirects; when you're forcing a user from example.com to www.example.com for example.

It would be nice to provide an option like so:

RedirectCode: '301'        # This could also be 'permanent'
RedirectSource: '/'
RedirectTarget: 'http://www.example.net'

And in redirect.tmpl:

Redirect {% if site.get('RedirectCode') %}{{ site.RedirectCode }}{% endif %} {{ vals.RedirectSource }} {{ vals.RedirectTarget }}

Thanks for your hard work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant