This is a discussion on mod rewrite within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi, i want to rewrite the folling URL /contact/bule102/smsk4/10.html into /zen/index.php?Site=contact/index....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
i want to rewrite the folling URL /contact/bule102/smsk4/10.html into /zen/index.php?Site=contact/index.html&bule=102&smsk=4&von=10 all the turorials i found wont help me. something like that i think: RewriteRule ^/contact/bule*/smsk*/*.html index.php?Site=contact index.html&bule=$1&smsk=$2&von=$3 any ideas? thanks -- cp |
|
|||
|
Christian Prochaska<chris_spam@bitterfeld-online.de> wrote:
> > i want to rewrite the folling URL > > /contact/bule102/smsk4/10.html > into > /zen/index.php?Site=contact/index.html&bule=102&smsk=4&von=10 > > all the turorials i found wont help me. > something like that i think: > > RewriteRule ^/contact/bule*/smsk*/*.html index.php?Site=contact > index.html&bule=$1&smsk=$2&von=$3 Two errors: 1. 'e*' matches zero or more consecutive 'e' characters. Similar for 'k*' and '/*'. 2. '$n' matches the n:th *parenthesised* group in the pattern. Untested: RewriteRule ^/contact/bule(.*)/smsk(.*)/(.*).html$ \ index.php?Site=contact/index.html&bule=$1&smsk=$2&von=$3 - or - RewriteRule ^/contact/bule([^/]*)/smsk([^/]*)/([^/]*).html$ \ index.php?Site=contact/index.html&bule=$1&smsk=$2&von=$3 - or - RewriteRule ^/contact/bule([0-9]*)/smsk([0-9]*)/([0-9]*).html$ \ index.php?Site=contact/index.html&bule=$1&smsk=$2&von=$3 - or some variation thereof. --n |