Octo-Labs / middleman-alias

Easy aliases/redirects for Middleman that are friendly to the Googles.
MIT License
35 stars 14 forks source link

Directory Index + Alias overlap #11

Closed Tuckie closed 9 years ago

Tuckie commented 9 years ago

I currently have a file named contact.html & have directory indexes turned on.

In order to map over from my old site's URL, I've added 'alias: contact.html' to the frontmatter.

All of the files build just fine, the problem is I cannot link to the regular contact page, as the alias overwrites the @_lookup_by_path hash.

Any ideas as to how I can make this work?

jagthedrummer commented 9 years ago

What happens when you do <%= link_to "Contact", '/contact' %> and/or <%= link_to "Contact", '/contact.html' %>?

Tuckie commented 9 years ago

I'm just going to handle these odd cases with a 301 in apache -- thanks!