Forum Replies Created

Viewing 1 replies (of 1 total)
  • The htaccess code I use for all my/client sites:

    # canonical redirect to no www
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    # protect wpconfig at all cost
    <files wp-config.php>
    Order deny,allow
    deny from all
    </files>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    That will 301 redirect to non-www version of the site (personal thing, i don’t like the extra chars). It will help protect your config file and add the typical wordpress mod_rewrite code…

    If you need it in that “mysite2009” directory then add that but my code assumes root.

Viewing 1 replies (of 1 total)