Redirected from the domain

Asked

Viewed 69 times

1

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

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

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

Works normally http://www.thiagopacheco.com/images/android.png www.thiagopacheco.com/images/android.png

So personal how can I solve?

via . htaccess or in the DNS zone?

  • if you are right of . com/ can no longer be worked at dns level dns cannot handle more than hostnames and Domains dns

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 command

sudo a2enmod rewrite

Finally a Restart in apache.

sudo /etc/init. d/apache2 Restart

And everything ok, even the . htaccess files that didn’t work now work.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.