This is a discussion on rewrite URLs that don't start with a certain pattern within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, After some steps with the rewrite engine I am stuck. I want to redirect every URL that does _not_ ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
After some steps with the rewrite engine I am stuck. I want to redirect every URL that does _not_ start with some pattern to another URL. But how do I write the condition for _not_ matching a pattern? For Example: www.myserver.net/blah -> www.myserver.net/subdir/ www.myserver.net/ -> www.myserver.net/subdir/ www.myserver.net/foo -> www.myserver.net/subdir/ www.myserver.net/subdir/ -> no rewrite www.myserver.net/subdir/foo -> no rewrite I am no regex expert, but after consulting some regex manuals I still cannot figure it out. Thanks, -Adi Schwarz |
|
|||
|
Adolf Schwarz wrote:
> Hi, > > After some steps with the rewrite engine I am stuck. > > I want to redirect every URL that does _not_ start with some pattern to > another URL. But how do I write the condition for _not_ matching a pattern? Sorry, just found out "!pattern" does it. -as |
| Thread Tools | |
| Display Modes | |
|
|