php_include bug?

Discussion in 'Setting-up protection' started by johnny0831, Sep 16, 2008.

  1. johnny0831

    johnny0831 New Member

    Joined:
    Aug 15, 2008
    Messages:
    8
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    in your .htaccess redirect everyone to the non www with something like this:

    Code:
    # If subdomain www exists, remove it first
    RewriteCond %{HTTP_HOST} ^www\.([^\.]+\.[^\.]+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    # If requested resource does not exist as a file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and does not end with a period followed by a filetype
    RewriteCond %{REQUEST_URI} !..+$
    # and does not end with a slash
    RewriteCond %{REQUEST_URI} !/$
    # then add a trailing slash and redirect
    RewriteRule (.*) $1/ [R=301,L]

Share This Page