0

Finally I have finished install SSL Certificate and finish to config the redirect from my old site to my new one, but right now when I try to entering from the old site, it send to me to new sit but withouth "/" like:

https://newsite.comindex.php?blabla

This is my httpd.conf configuration:

<VirtualHost oldsite.com:80>
        ServerName oldsite.com
        Redirect permanent "/" https://newsite.com/
</VirtualHost>
<VirtualHost oldsite:443>
        ServerName oldsite.com
        Redirect permanent "/" https://newsite.com/
</VirtualHost>
<VirtualHost *:80>
        ServerName https://newsite.com
        Redirect permanent "/" https://newsite.com/
</VirtualHost>

I really appreciate any help you can provide.

0

Try it like this:

<VirtualHost *:80>
        ServerName oldsite.com
        Redirect permanent / https://newsite.com/
</VirtualHost>
<VirtualHost *:443>
        ServerName oldsite.com
        Redirect permanent / https://newsite.com/
        SSLEngine On
        SSLCertificateFile oldcert…
        SSLCertificateKeyFile oldkey…
</VirtualHost>
<VirtualHost *:443>
        ServerName https://newsite.com
        Redirect permanent / https://newsite.com/
        SSLEngine On
        SSLCertificateFile newcert…
        SSLCertificateKeyFile newkey…

        <Directory /var/www/html/mysite/>

        </Directory>
</VirtualHost>

NameVirtualHosts should not be used anymore. Take care that you have a trailing slash in your Directory directive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.