Categories
Linode SpinupWP

Be your own host

This month I offered to demo SpinupWP and Linode for our local MSPWP WordPress meetup. The slides from that presentation are available here, as are the other links I shared. My apologies for the awkward minutes when the first part of the demo failed!

As emphasized in the presentation, using SpinupWP to manage a cloud server like those at Linode is a great solution if you are looking for control of your WordPress infrastructure. But it does demand more attention from you than shared hosting or managed WordPress hosting.

Categories
AWS

S3 Redirects

When moving our Tenseg site to S3 we overlooked some redirects that were in an htaccess file. Most of these we could fix with Jekyll front matter and plugins, but there were two that really needed conditional redirection of a more sophisticated sort. For these we ended up creating some redirection rules in S3 itself.

In the “Static website hosting” property of the S3 bucket we added some XML redirection rules.

<RoutingRules>
	<RoutingRule>
		<Condition>
			<KeyPrefixEquals>archives/date/</KeyPrefixEquals>
		</Condition>
		<Redirect>
			<ReplaceKeyPrefixWith>blog/</ReplaceKeyPrefixWith>
			<HostName>www.tenseg.net</HostName>
		</Redirect>
	</RoutingRule>
	<RoutingRule>
		<Condition>
			<KeyPrefixEquals>archives/category/</KeyPrefixEquals>
		</Condition>
		<Redirect>
			<ReplaceKeyPrefixWith>blog/category/</ReplaceKeyPrefixWith>
			<HostName>www.tenseg.net</HostName>
		</Redirect>
	</RoutingRule>
</RoutingRules>

These rules mean that any reference to the /archives/date directory was turned into a reference to the /blog directory, and any reference to the /archives/category directory was turned into a reference to the /blog/category directory. The odd thing was that without the explicit HostName parameter used above, the redirections were made directly into the raw bucket URL, which was very ugly.