forked from remy/twivatar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
26 lines (22 loc) · 1.04 KB
/
.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
<IfModule mod_rewrite.c>
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteBase /
# no-www.org
RewriteCond %{HTTP_HOST} ^www\.twivatar\.org$ [NC]
RewriteRule ^(.*)$ http://twivatar.org/$1 [R=301,L]
# if the file or directory does exist
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]
# handle early adopters until they've had time to change their site
RewriteCond %{HTTP_REFERER} ^http://(www\.)?joshrussell\.com\/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?twaud\.io\/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://zubeta\.com/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://blog\.petrusha\.name/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://offline\.twivatar\.org\/.*$ [NC]
RewriteRule ^(mini|bigger|normal|original)/([a-z0-9_]*)/*$ index.php?size=$1&user=$2 [NC,L]
# NOTE valid usernames are: Only use letters, numbers and '_'
RewriteRule ^([a-z0-9_]*)/(mini|bigger|normal|original)/*$ index.php?size=$2&user=$1 [NC,L]
RewriteRule ^([a-z0-9_]*)/*$ index.php?user=$1 [NC,L]
</IfModule>