htaccess

Discussion in 'PHP' started by ηЄ†ЯΘ, Sep 29, 2009.

  1. #1
    ok i have my .htaccess at
    /something/.htaccess

    my directory tree is like:
    /something/subfolder/process/read.php
    /something/subfolder/files/example.jpg

    here's want i want
    if url is /something/mask/read ----> /something/subfolder/process/read.php
    if url is /something/mask -----------> /something/subfolder

    the 2rd rule basically means that if "/mask" is not followed by "/read" then "/mask" will be only a mask of folder "/subfolder"

    so if url is /something/mask/read?q=1, that's actually /something/subfolder/process/read.php?q=1

    and if url is /something/mask/files/example.jpg, that's actually /something/subfolder/files/example.jpg

    note that the second rule is not exclusive for files. if url is /something/mask/anyfolder/action.php, then that's actually /something/subfolder/anyfolder/action.php
     
    ηЄ†ЯΘ, Sep 29, 2009 IP
  2. tguillea

    tguillea Active Member

    Messages:
    229
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #2
    tguillea, Sep 29, 2009 IP