Articles Tagged with spam

You are currently browsing 1 articles tagged with spam.

  • 7 Nifty htaccess Tips

    Published Monday 8th of June 2009

    If you use Apache you've probably heard of a file called .htaccess. It can be extremely useful for a number of different things. Here are some htaccess-tricks I've been using myself.

    # A little mod rewritin
    <IfModule mod_rewrite.c>
        
    # Start ModRewrite
        
    RewriteEngine On
        RewriteBase 
    # Root-dir for your site

        # Prevent access for visitors without user-agent string (prevents some spam)
        
    RewriteCond %{HTTP_USER_AGENT} = ""
        
    RewriteRule .* - [F,L]

        
    # Prevent www-access (you should change the yourdomain-bit)
        
    RewriteCond %{HTTP_HOST} ^www.yourdomain.com$ [NC]
        
    RewriteRule ^(.*)$ http://yourdomain\.com/$1 [R=301,L]

        # Force a trailing slash for dirs
        
    RewriteRule !..{2,4}$ - [C]
        
    RewriteCond %{REQUEST_URI} !^.*/$
        
    RewriteRule ^(.+)$ $1/ [R=301,L]

        
    # These are useful for running everything but real files through index.php (the way many CMSes and blogs work)
        # Redirect /index.php to /
        
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*index.php
        RewriteRule 
    ^index.php/?(.*)$ $[R=301,L]

        
    # Run everything else but real files through index.php
        
    RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond 
    %{REQUEST_FILENAME} !-f
        RewriteRule 
    ^(.*)$ index.php/$1?%{QUERY_STRING} [L]
    </
    IfModule>

    # These are for performance and they increase
    # speed a lot! (try yslow wiv and wivout)
    # Configure ETags
    FileETag MTime Size

    # Enable expirations
    <IfModule mod_expires.c>
        
    ExpiresActive On
        ExpiresDefault 
    "access plus 3 days"
    </IfModule>

    # Gzip HTML, CSS and JS
    <IfModule mod_deflate.c>
        
    AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml
    </IfModule>

    Hope it wasn't all old news to you!

    Be the first to post a comment

Random jQuery Plug-ins

  • Pixastic Editor

    This app/plug-in inserts a (completely stylable) toolbar next to any image in your document that allows the user to apply different Pixastic-effects ...

    Details

  • Image Zoom

    This plug-in makes links pointing to images open in the "Image Zoom". Clicking a link will zoom out the clicked image to its target-image. Click anywh...

    Details

  • Content Scroller

    Use this plug-in to make a list of elements only show one at a time and every now and then scroll to the next one. The plug-in scrolls in infinty, sta...

    Details

More Plug-ins

Recent Comments

  1. AL on "Accessible, Stylish Modal Windows With Modern CSS"

    @Matt - What exactly isn't working? "Not working" ...

  2. roboteich on "Accessible, Stylish Modal Windows With Modern CSS"

    This is hardly accessible. Screen reader focus is...

  3. Matt on "Accessible, Stylish Modal Windows With Modern CSS"

    I have tried to implement this, but for some reaso...

Page cached. Loaded in: 0.0069 second(s).
Last DB change: 2010-09-03 17:14:49
Last file change: 2010-08-12 15:31:16
Cache created: 2010-09-03 19:45:22