Contoh kita mau meredirect www.jaranguda.com ke jaranguda.com, jadi setiap ada pengunjung yang mengunjungi www.jaranguda.com akan otomatis di redirect ke jaranguda.com, didalam virtualhost apache anda tambahkan

        Redirect permanent / http://jaranguda.com/

contoh file virtualhost lengkapnya bisa dilihat dibawah ini

<VirtualHost *:80>
        ServerAdmin deleng@jaranguda.com
        ServerName jaranguda.com
        DocumentRoot /var/www/perkis
        Redirect permanent / http://jaranguda.com/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/perkis>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Leave a comment

Your email address will not be published. Required fields are marked *