Joomla! Day UK 2009 .htaccess

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    All Presentations must start with this page first

    1 Favorite

    Joomla! Day UK 2009 .htaccess - Presentation Transcript

    1. Joomla! Day UK 2009
    2. Joomla! Day UK 2009 Effective use of the .htaccess file & Redirection Andrew Rose Inch Hosting http://www.inchhosting.co.uk/ The UK Joomla! Specialists
    3. Introduction
      • Background
      • Exploit Blocking
      • Rewrites - SEF
      • Redirects
      • Security
      • Other
    4. Background
      • Apache Servers!
      • Regular Expressions
        • Eleven characters with special meanings:
          • opening square bracket [
          • backslash
          • caret ^
          • dollar sign $
          • period or dot .
          • vertical bar or pipe symbol |
          • question mark ?
          • asterisk or star *
          • plus sign +
          • opening round bracket (
          • closing round bracket )
    5. Block Exploits
      • ## This attempts to block the most common type of exploit `attempts` to Joomla!
      • #
      • # Block out any script trying to set a mosConfig value through the URL
      • RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
      • # Block out any script trying to base64_encode crap to send via URL
      • RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
      • # Block out any script that includes a <script> tag in URL
      • RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
      • # Block out any script trying to set a PHP GLOBALS variable via URL
      • RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
      • # Block out any script trying to modify a _REQUEST variable via URL
      • RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})
      • # Send all blocked request to homepage with 403 Forbidden error!
      • RewriteRule ^(.*)$ index.php [F,L]
      • #
      • ########## End - Rewrite rules to block out some common exploits
    6. Rewrites – SEF
      • ########## Begin - Joomla! core SEF Section
      • #
      • RewriteCond %{REQUEST_FILENAME} !-f
      • RewriteCond %{REQUEST_FILENAME} !-d
      • RewriteCond %{REQUEST_URI} !^/index.php
      • RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.]*)$ [NC]
      • RewriteRule (.*) index.php
      • RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
      • #
    7. Redirects
      • Rewrite URLs to allow various redirections
      • e.g. Re-write www.inchdesign.co.uk to a directory located inchhosting.co.uk/design/
        • RewriteCond %{HTTP_HOST} inchdesign.co.uk
        • RewriteCond %{REQUEST_URI} !^/design
        • RewriteRule ^(.*)$ design/$1 [L]
    8. Security – Password Protection
      • .htpasswd (put it out of the web accessible site)
          • username:password (password needs to be encrypted - http://www.tools.dynamicdrive.com/password/)
      • .htaccess
          • AuthUserFile /root to your password file/.htpasswd
          • AuthGroupFile /dev/null AuthName EnterPassword
          • AuthType Basic
          • require user username (the username you want to give access to)
    9. Security – IP Protection
      • AuthName &quot;Protected Content&quot; AuthType Basic order deny,allow deny from all allow from 255.255.255.255
    10. Other
      • SetEnv DEFAULT_PHP_VERSION 5
      • php_flag register_globals off
    SlideShare Zeitgeist 2009

    + Andy WallaceAndy Wallace Nominate

    custom

    664 views, 1 favs, 0 embeds more stats

    Andrew Rose (UK Community member) presentation on t more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 664
      • 664 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 17
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories