Redirect Loop in Cpanel servers

It seems the issue is in the .htaccess file creation:

it looks like this:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^.*?$ "http\:\/\/domain\.com\/subdir" [R=301,L]

instead of this:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/?$ "http\:\/\/domain\.com\/subdir" [R=301,L]

One thought on “Redirect Loop in Cpanel servers

Leave a comment