Saturday, 17 August 2013

Rewrite Rule for default directory

Rewrite Rule for default directory

I have a number of directories configured like this:
/site/[category]/[subcategory]/browse
Within each browse folder I have directories named like so:
/1-10
/11-20
/21-30
and within each of those folders there is an index.html and nothing else.
I want to set up a Rewrite rule such that requests to:
/site/[category]/[subcategory]/browse and
/site/[category]/[subcategory]/browse/
are equivalent to
/site/[category]/[subcategory]/1-10
but I want all the other requests to remain the same. For instance I don't
want this rewrite to affect requests to
/site/[category]/[subcategory]/browse/11-12.
Basically I want the /1-10/index.html page to be the default page for the
[subcategory] folder.
This is probably quite basic, but between the agonies of apache
configuration and regex, I'm having no luck.

No comments:

Post a Comment