-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.htaccess
33 lines (21 loc) · 988 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<IfModule mod_rewrite.c>
RewriteEngine On
# redirect all subdomains to http://www.pouet.net
RewriteCond %{HTTPS} ^off$ [NC]
RewriteCond %{HTTP_HOST} =pouet.net [OR]
RewriteCond %{HTTP_HOST} =pouet.scene.org [OR]
RewriteCond %{HTTP_HOST} =www.pouet.scene.org
RewriteRule ^(.*)$ http://www.pouet.net/$1 [R=301,QSA,NE,L]
RewriteCond %{HTTPS} ^on$ [NC]
RewriteCond %{HTTP_HOST} =pouet.net [OR]
RewriteCond %{HTTP_HOST} =pouet.scene.org [OR]
RewriteCond %{HTTP_HOST} =www.pouet.scene.org
RewriteRule ^(.*)$ https://www.pouet.net/$1 [R=301,QSA,NE,L]
# redirect all old directories to content domain
RewriteRule ^avatars\/(.*)$ http://content.pouet.net/avatars/$1 [R=301,L]
RewriteRule ^gfx\/(.*)$ http://content.pouet.net/gfx/$1 [R=301,L]
RewriteRule ^screenshots\/(.*)$ http://content.pouet.net/screenshots/$1 [R=301,L]
# maintenance mode, if needed
# RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
# RewriteRule .* http://content.pouet.net/maintenance.html [R=302,L]
</IfModule>