Development RegEx help please

Discussion in 'Software' started by jezmck, 28 Mar 2006.

  1. jezmck

    jezmck Minimodder

    Joined:
    25 Sep 2003
    Posts:
    4,456
    Likes Received:
    36
    Hi all,

    I have RewriteRule ^([a-z0-9]+)/?$ /?page=$1 [NC]

    but don't want that to match /blog/? or /wiki/?

    I thought I had it, but nope.

    Any help much appreciated.
     
    Last edited: 28 Mar 2006
  2. Nath

    Nath Your appeal has already been filed.

    Joined:
    28 Dec 2003
    Posts:
    2,409
    Likes Received:
    1
    Pretty wild stab in the dark, but here goes.

    As far as I know you can specify conditions for rewrite rules.

    Code:
    RewriteCond %{REQUEST_URI} !^/blog/
    RewriteCond %{REQUEST_URI} !^/wiki/
    RewriteRule ^([a-z0-9]+)/?$ /?page=$1 [NC]
    That's fairly sketchy, and probably won't work, but a refined version of that could possibly work.
     

Share This Page