.htaccess to allow specific folders

Discussion in 'Apache' started by reneeboy1, May 23, 2009.

  1. #1
    Hi everybody,

    i am having a problem and insearch of help i reached here. My problem is that, in my .htaccess , i have the following code

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond  %{REQUEST_FILENAME}  !-F
    RewriteCond  %{REQUEST_FILENAME}  !-D
    RewriteRule  (.*) index.php [L]
    
    <Files ~ "License Number.txt">
       Order allow,deny
       Deny from All
    </Files>
    
    Code (markup):
    But when i open my site for example, http://mysite.com/newsite/

    The images on my site doesn't appears, even the images folder is located inside /newsite/images , i have checked the link of images, which is correct link, but it didn't works. Kindly Help regarding this issue. Thank you. I think .htaccess is blocking images folder from being executed.
     
    reneeboy1, May 23, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    first just try removing the ~ from the Files directive, see what happens.

    it looks like you're trying to redirect a request for anything which isn't already a file or directory existing on the server, to index.php. any reason you can't just let it give a 404?
     
    szalinski, May 26, 2009 IP