Forum Moderators: phranque
is that possible? what's the best way to go about it, to create a new rewrite rule, or just adjust the first rule?
so all together it would be
domain.com/index.php?lotsofnastycharacters - to
domain.com/123.html - to
domain.com/cat1/cat2/123.html
1. shown to customer:
a) domain.com/123.html
b) domain.com/cat1/cat2/123.html
2. that's the way it really is:
domain.com/index.php?lotsofnastycharacters - to
You can simply add a second rule for domain.com/cat1/cat2/123.html . This way both URLs would work - but would eventually be picked up by SEs, looking like dup content.
So, you would want to add another rule that REDIRECTS (not rewrites)
domain.com/123.html -> domain.com/cat1/cat2/123.html ,
i.e. something like (untested...)
^([a-z0-9]+)\.html$ cat1/cat2/$1.html[R=301,NC]
This way, if the user types in test.html, his browser will reload the page and show the new name "cat1/cat2/test.html".
(finding errors is left as an exercise to the readers ;-)
nerd