Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

provide option for setting status on redirect from requires-scheme #75

Closed
deliminator opened this issue Oct 8, 2013 · 4 comments
Closed

Comments

@deliminator
Copy link
Contributor

There is a TODO here:
https://github.com/cemerick/friend/blob/master/src/cemerick/friend.clj#L32

After researching this issue a little bit, I think the general opinion is that 301 (permanent redirect) plays better with some search engines.

One of the reasons I'm concerned about this is that google is currently indexing my http://... url rather than my https://... url. I think changing to 301 may solve this issue.

What do you think?

http://moz.com/learn/seo/redirection
http://www.bigoakinc.com/blog/when-to-use-a-301-vs-302-redirect/
http://blog.mastykarz.nl/sharepoint-2007-redirect-solved-using-301-instead-of-302-redirects/
http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/

deliminator added a commit to deliminator/friend that referenced this issue Oct 8, 2013
deliminator added a commit to deliminator/friend that referenced this issue Oct 8, 2013
@cemerick
Copy link
Owner

cemerick commented Oct 8, 2013

I would like to see this be an option on the (currently) 3-arg arity of the middleware fn, with the default providing the current behaviour. I suspect different users want/need 301 or 302, depending.

BTW, all you need to make the existing redirect call in the middleware a 302 is to assoc a :status of 302 (thereby avoiding having to add a new moved-permanently fn).

deliminator added a commit to deliminator/friend that referenced this issue Oct 8, 2013
@deliminator
Copy link
Contributor Author

How about this?

deliminator added a commit to deliminator/friend that referenced this issue Oct 8, 2013
deliminator added a commit to deliminator/friend that referenced this issue Oct 8, 2013
cemerick added a commit that referenced this issue Oct 8, 2013
Fix gh-75 provide option for setting status on redirect from requires-scheme
@cemerick
Copy link
Owner

cemerick commented Oct 8, 2013

Merged, thanks!

@deliminator
Copy link
Contributor Author

Thanks as well!

@cemerick cemerick removed this from the 0.3.0 milestone May 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants