Using .htaccess to rewrite folder structure for blog


(Matt C) #1

Hello fellow RapidWeavers,

I have a blog that I’m writing: outinsacramento.com

The blog is the primary home page and the natural folder structure of the posts is not conducive to SEO or sharing links.

Example:

outinsacramento.com/files/lowbrau.html

I would like to use .htaccess to allow me to rewrite this link as:

outinsacramento.com/lowbrau.html
or
outinsacramento.com/lowbrau/

Or worst case:
outinsacramento.com/posts/lowbrau.html`

Is this possible and if so, how would I write that command in my .htaccess file?

Thank you!