.htaccesshttp-redirectmod-rewrite

too many redirections in my server


Just now im pointing to squarespace to see my webpage, but since now I want to manage my own webpage from my server but when I change the DNS to redirect to my site, chrome and safari said too many redirections.

this is my htaccess:

Options +FollowSymLinks
Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule> 
RewriteCond %{HTTP_HOST} ^minutos\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.minutos\.com$
RewriteRule ^/?$ "http\:\/\/www\.minutos\.com\/" [R=301,L]

But I don't know how to solve this mistake.


Solution

  • RewriteCond %{HTTP_HOST} ^minutos\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.minutos\.com$
    RewriteRule ^/?$ "http\:\/\/www\.minutos\.com\/" [R=301,L]
    

    The above is redirecting in an infinite loop, change to:

    RewriteCond %{HTTP_HOST} ^minutos\.com$
    RewriteRule ^/?$ "http\:\/\/www\.minutos\.com\/" [R=301,L]