Clean URLs for static HTML files with .htaccess and mod_rewrite
Posted
by alistair.mp
on Stack Overflow
See other posts from Stack Overflow
or by alistair.mp
Published on 2010-05-14T17:52:58Z
Indexed on
2010/05/14
18:34 UTC
Read the original article
Hit count: 300
Hello. mod_rewrite always baffles me... can anyone tell me the rules I need to get the following clean URLs? Desired URL on the left, real URL on the right.
/our-work/ => /our-work.html
/our-work/some-project/ => /our-work/some-project.html
/contact/ => /contact.html
As you can see, I want to force trailing slashes on all URLs too.
Thanks!
© Stack Overflow or respective owner