Apache2 configuration, .htacces and 310 error (www redirection)

Posted by allstat on Server Fault See other posts from Server Fault or by allstat
Published on 2012-05-30T16:01:42Z Indexed on 2012/05/30 16:44 UTC
Read the original article Hit count: 356

Filed under:
|
|

I have an ubuntu apache serveur, with many websites. all my website have the same bug ( so it's look like a misconfiguration)

http://www.2sigma.fr <- it's work fine ( we see "en travaux")

http://2sigma.fr <- dont work, i got 310 error (cyclic redirection!)

here my .htaccess

Options +FollowSymlinks
RewriteEngine on
RewriteCond  %{HTTP_HOST}      ^2sigma\.fr$
RewriteRule  ^(.*)             http://www.2sigma.fr/$1      [R=301,L]

here my confguration

<VirtualHost *:80>
<IfModule mpm_itk_module>
AssignUserId sigma www-data
</IfModule>

    ServerAdmin [email protected]
    ServerName 2sigma.fr
    ServerAlias www.2sigma.fr
    DocumentRoot /home/sigma/www
    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /home/sigma/www>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>
    ErrorLog /var/log/apache2/error_sigma
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
     CustomLog /var/log/apache2/access_sigma combined
    ServerSignature Off

If i use this .htaccess it's work fine :

Options +FollowSymlinks
RewriteEngine on
RewriteCond  %{HTTP_HOST}      ^2sigma\.fr$
RewriteRule  ^(.*)             http://www.google.fr/$1      [R=301,L]

I think that it is a apache configuration probleme... but i dont kno how to solve it.

Thanks for your help

© Server Fault or respective owner

Related posts about apache2

Related posts about .htaccess