Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Can not redirect using .htaccess

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
yokotsumo
Posts: 3
Joined: Tue Jul 22, 2014 1:00 pm

Can not redirect using .htaccess
  • Quote

Post by yokotsumo » Tue Jul 22, 2014 1:05 pm

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.
Top

erldcrtz
Posts: 73
Joined: Tue Jun 10, 2014 6:16 am

Re: Can not redirect using .htaccess
  • Quote

Post by erldcrtz » Mon Jul 28, 2014 5:09 pm

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
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password