mod rewrite

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....


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-23-2004
Christian Prochaska
 
Posts: n/a
Default mod rewrite

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
  #2 (permalink)  
Old 09-26-2004
Nisse Engstrom
 
Posts: n/a
Default Re: mod rewrite

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
  #3 (permalink)  
Old 09-30-2004
Christian Prochaska
 
Posts: n/a
Default Re: mod rewrite

Nisse Engstrom wrote:
> Two errors:
> Untested:


> RewriteRule ^/contact/bule(.*)/smsk(.*)/(.*).html$ \
> index.php?Site=contact/index.html&bule=$1&smsk=$2&von=$3


I will try it, thank you.

Greetings
--
cp
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0