#Action php54-cgi /php54.cgi
#AddHandler php54-cgi .php

# Updates here should coincide with rp.getRestOfUrl()
RewriteEngine On

RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

RewriteRule ^r/(.*) /index.html
RewriteRule ^u(ser)?/(.*) /index.html
RewriteRule ^domain/(.*) /index.html
RewriteRule ^search(.*) /index.html

# to hide .git, allow redditp.com/.compact, and letsencrypt looks at `.well-known`
RewriteRule ^\.([^w].*) /index.html

# new multireddits with /me/
RewriteRule ^me/(.*) /index.html

ErrorDocument 404 /404.html
