help! I'm in ISPconfig3 .htaccess hell

Discussion in 'Server Operation' started by aristotlejones, Jan 14, 2012.

  1. aristotlejones

    aristotlejones New Member

    I simply want to put an .htaccess file in my web directory for a site on an ISPConfig3 server that will redirect from to just

    I've tried adding this to the .htaccess file

    //Rewrite to www
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^[nc]
    RewriteRule ^(.*)$$1 [r=301,nc]

    and other variations found online, however non are working. Does anyone know if .htaccess files are being blocked higher up in a config somewhere or what I'm doing wrong?

  2. aristotlejones

    aristotlejones New Member

    Solved it

    Ok, solved it

    the key is to enable the www subdomain in the ISPconfig3 sites domain settings, then put in the redirect as follows:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST}$ [NC]
    RewriteRule ^(.*)$$1 [R=301,L]

Share This Page