rewrite www-subdomain to non-www
parent
3453bc6bb4
commit
673affb70c
|
@ -1,13 +1,28 @@
|
||||||
|
# Redirect www subdomain to non-www
|
||||||
|
<VirtualHost *:8080>
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Get protocol
|
||||||
|
RewriteCond %{HTTPS} =on
|
||||||
|
RewriteRule ^(.*)$ - [env=proto:https]
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteRule ^(.*)$ - [env=proto:http]
|
||||||
|
|
||||||
|
# Rewrite to proto://www-less-host/location
|
||||||
|
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||||
|
RewriteRule ^(.*)$ %{ENV:proto}://%1$1 [R=301,L]
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
# The normal virtual host for this specific site
|
||||||
<VirtualHost *:8080>
|
<VirtualHost *:8080>
|
||||||
ServerName publiccode.eu
|
ServerName publiccode.eu
|
||||||
|
|
||||||
ServerAdmin contact@fsfe.org
|
ServerAdmin contact@fsfe.org
|
||||||
DocumentRoot /app
|
DocumentRoot /app
|
||||||
|
|
||||||
<Directory /app/>
|
<Directory /app/>
|
||||||
Options FollowSymLinks Includes
|
Options FollowSymLinks Includes
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
Loading…
Reference in New Issue