expercise / coding-expercise

Web application for coding-expercise
32 stars 11 forks source link

Canonical URL: http://www.expercise.com to http://expercise.com #101

Closed ufuk closed 8 years ago

ufuk commented 8 years ago

Done by changing Apache HTTP Server site config (/etc/apache2/sites-enabled/expercise.conf)

<VirtualHost *:80>
    ServerName www.expercise.com
    Redirect 301 / http://expercise.com/
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin expercise@gmail.com
    ServerName expercise.com
    ServerAlias www.expercise.com

    RewriteEngine On
    RewriteCond %{HTTP_HOST}    ^www.expercise.com [nocase]
    RewriteRule ^(.*)           http://expercise.com$1 [last,redirect=301]

    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
</VirtualHost>