Redirected from the domain

1

I have a domain by Locaweb that redirects to my ip from vps via A and CNAME. It normally redirects the link mainly however when and typed link with http: // without the www and also even if http: // it is redirected to the main site other than access by entering only the www.

On the server everything is ok because my testing using ip instead of the domain normally.

Redirect: link thiagopacheco.com/images/android.png

It works normally link www.thiagopacheco.com/images/android.png

So how can I solve it?

via .htaccess or in the DNS zone?

    
asked by anonymous 17.10.2018 / 14:13

1 answer

0

The problem was in vps, to solve.

  

/etc/apache2/apache2.conf

Edit

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride none
Require all granted
</Directory>

To

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
  

AllowOverride All

And then I enabled

  

mod_rewrite

with the

  

sudo a2enmod rewrite

Finally a restart in apache.

  

sudo /etc/init.d/apache2 restart

And all okay, even the .htaccess files that did not work now work.

    
22.10.2018 / 01:11