rewrite manually typed url to one or two allowed urls

rewrite manually typed url to one or two allowed urls

am 21.10.2007 21:58:53 von Verob

Hi there:

I have a small problem with a url that I can't rewrite the way I want
to. I am working with a cms that rewrites nearly everything I want to.
Nearly! Please see this sample URL:

http://www.domain.tld/webproject/language/category/article.h tml

That CMS has some fall back rules for the category and for the articel
part but it fails, if someone manually types something wrong at the
webproject and language part.

When typing ...

http://www.domain.tld/webproject/language/cate/art.html

.... the CMS will try to change it into something that makes sense and
if that doesn't work out it will change it into the first possible
category and article that is available. That's fine to me.

But if someone types...

http://www.domain.tld/webber/lang/category/article.html

.... which means non available webproject and non available language
the CMS will quit and cause a PHP error.

Of course the best way would be to change the CMS to also care for the
webproject and language part with including some fall back rules as
well. But is there a way to handle this with modrewrite? Something
like whatever someone types within the webproject and language part it
will change it to the default e.g. mywebproject and mylanguage. How do
I have to do that? I can't find a way.

Thanks for any help