SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WPMu and htaccess for protecting files

    Hello all,
    I have a WPMu 2.7.1 install and I have the following htaccess file which does not work in the wp-includes and wp-content directories. The htaccess file is suppose to block all requests to files apart from the ones listed in the rule. This is to try and reduce the risk of using third party plugins and themes.

    Any ideas why this htaccess blocks all file requests including .css and .js?

    Code:
    Order Allow,Deny
    <Files ~ ".(css|jpg|png|gif|js)$">
    Allow from all
    </Files>
    Cheers

    Zanis

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello all,

    The answer I have found is watch how your MAC FTP client formats the file being uploaded! I found via a Windows box that the file contents had no line returns!

    No idea what I need to change in my FTP on MAC but will work it out - something to do with line returns.

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Zanis,

    Just use a TEXT editor and upload (FTP) in ASCII mode.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •