0

This should be pretty simple, but what would be the best way to set up a 301 redirect to the latest post of a node type, for example.

For example: example.com/blog/latest -> example.com/node/*

Ehat I was originally was doing was using views, getting the path of the latest post (+ random, also in views) and rewrite the results with a simple <a href="[path]">Latest</a>.

But, since I need to include this in email message, a URL is desired (as well as adding Google Analytics UTM Parameters).

What would be the simplest, site builder way to do this?

1
  • You probably don't want a 301 redirect (Moved Permanently) since you don't intend to permanently associate /blog/latest with a given node. Alternatively, display the latest blog post at /blog/latest using a view or the "Smart Node Links" module recommended by 2pha. – montaigne Mar 13 '15 at 3:54
2

There seems to be a module for that.
Smart Node Links

1
  • Brilliant, exactly solves my use case. – inkovic Mar 13 '15 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.