Good idea, but does not work either - surprisingly! -
There should be a clean way with regex for this task. Andy regex expert in here? Merlin "Kae Verens" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Merlin wrote: > > ufff.. sorry guys, but I have to explain that better. I appreciate your > > help, maybe I did not give enough info. > > > > I am trying to redirect with apache modrewrite. To do this you have to use > > regex (not if functions:-) > > > > My problem is, that there are member accounts which look like that: > > > > membername/contact.html > > > > and there are partner accounts which look like this: > > > > partner/name/contact.html > > > > The goal is to redirect only if it is a member account. If I put a > > (.*)/contact.html it also matches the partner/ > > I tryed putting a root / infront, but there is not / root for the url from > > apaches point of view. > > > > So I would need a regex which will match the member account, but if the > > first word is "partner" it should > > not terminate. > > > > This seems to be a tough one! > > > > ah - maybe a chain of rewrites would do? > > send all matches of /^partner\/(.*)\/contact.html$/ to partner\/\1\/blah > send all matches of /^(.*)\/contact.html$/ to NEWLOCATION > send all matches of /^partner\/(.*)\/blah$/ to partner\/\1\/contact.html > > Kae > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php