Need help with this htacess file

Discussion in 'PHP' started by lucaskent, Aug 8, 2011.

  1. #1
    Hi people, please help me out with this htaccess file, i dont understand htaccess files much.
    Here is the file.

    RewriteEngine On

    RewriteRule ^\.htaccess$ - [F]

    RewriteCond %{REQUEST_URI} =""
    RewriteRule ^.*$ /booking/public/index.php [NC,L]

    RewriteCond %{REQUEST_URI} !^/booking/public/.*$
    RewriteRule ^(.*)$ /booking/public/$1

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^.*$ - [NC,L]

    RewriteRule ^public/.*$ /booking/public/index.php [NC,L]

    This file makes the program work only when its placed in the root directory. But i want to change it to test directory can any one help me with it. Where should i make the change.
     
    lucaskent, Aug 8, 2011 IP
  2. Andre91

    Andre91 Peon

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Put a .htaccess file in the test directory with the respective root path / edit the current .htaccess file if it's already there I guess.
     
    Andre91, Aug 8, 2011 IP
  3. ausrixy

    ausrixy Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #3
    you need to put the .htaccess file in any directories that you wish to work with.
     
    ausrixy, Aug 10, 2011 IP
  4. lucaskent

    lucaskent Peon

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ya i know it should, but it is a different sort of script so it dint, anyways i somehow found a work around.
     
    lucaskent, Aug 10, 2011 IP
  5. JohnnySchultz

    JohnnySchultz Peon

    Messages:
    277
    Likes Received:
    4
    Best Answers:
    7
    Trophy Points:
    0
    #5
    JohnnySchultz, Aug 11, 2011 IP