Jump to content

Virtualhost Redirect


wiggst3r

Recommended Posts

Hi

 

I'm trying to setup a redirect so when users go to my site by typing in either www.example.com or simply example.com they are always redirected to www.example.com

 

My current virtual host is:

 

<VirtualHost xx.xx.xx.xx:80>
        ServerAdmin [email protected]
        ServerName www.exmple.com
        ServerAlias exmple.com
        DocumentRoot /var/www/example/current/

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
</VirtualHost>

 

What do I need to cgane to achieve this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/155156-virtualhost-redirect/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.