WEB Help me fix my mod rewrite please

Discussion in 'OT Technology' started by Ricky, Dec 24, 2008.

  1. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    I never used it before but i was fucking around with it.

    http://www.offtopic.me

    Basically i want it to do what its doing now, but only to the /wiki/ folder.

    I would like the rest of links/pictures everything else to not be redirected to that wiki folder.

    My htaccess code:

    Code:
    AddType x-mapp-php5 .php
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/w.*/
    RewriteRule ^(.*) /wiki/index.php/$1 [L]

    I really hope that made sense. I havent slept since 12pm yesterday so :o
     
  2. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    nothign?
     
  3. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    no early christmas gift for me i guess
     
  4. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
  5. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    Code:
    RewriteCond %{REQUEST_URI} !^/wiki/
    RewriteRule !\.(\w+)$ /wiki/index.php/$1 [L,NS]
    
    That should redirect any files that don't end in a dot extension (e.g. .gif, .png) to the wiki, and shouldn't touch any wiki URLs.
     

Share This Page