Apache Server configuration support - rewrite manually typed url to one or two allowed urls

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > October 2007 > rewrite manually typed url to one or two allowed urls





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author rewrite manually typed url to one or two allowed urls
Verob

2007-10-21, 7:23 pm

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/la...ry/article.html

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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com