Page 1 of 1

Can not redirect using .htaccess

Posted: Tue Jul 22, 2014 1:05 pm
by yokotsumo
Hello,

I have multiple domains (.com, .net, .org, etc.) attached to a domain.
I am using default nginx and apache configuration.
I added this lines to .htacces:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

As a result the browser displays an error message saying the page is not correctly redirected.
Is there something special to do with vestaCP?

Sincerely.

Re: Can not redirect using .htaccess

Posted: Mon Jul 28, 2014 5:09 pm
by erldcrtz
yokotsumo wrote:Hello,

I have multiple domains (.com, .net, .org, etc.) attached to a domain.
I am using default nginx and apache configuration.
I added this lines to .htacces:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

As a result the browser displays an error message saying the page is not correctly redirected.
Is there something special to do with vestaCP?

Sincerely.
that means its something to do with your rewrite code

try to remove Options +FollowSymLinks and see if it works