Shalin Shah
Shalin Shah

Reputation: 8183

How to make a static site look dynamic - .htaccess in apache

I have a site that I am running in Apache that is static and I want the server to treat each file as a directory. I have this thing set up in .htaccess that will get rid of all .html extensions. So this is what I want:

Ex.

http://example.com/about (Currently)

to

http://example.com/about/

without having to change it into a directory or make it dynamic. Is there a .htaccess hack? Is it possible?

Upvotes: 0

Views: 144

Answers (1)

Henrik Karlsson
Henrik Karlsson

Reputation: 5723

You should check out mod_rewrite which lets you rewrite any url using regular expressions.

Upvotes: 1

Related Questions