I have a website that has custom subdomains for users, e.g. creator.snaprate.me
.
This works great, but if I manually type in creator.snaprate.me/login
the login page (snaprate.me/login)
appears.
I'd like to have a redirect to snaprate.me/anypage
for any subdomain, but don't know how.
I have the following .htaccess, and this has been working great except for this issue:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^((?!www\.)[^.]+).snaprate\.me$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^((?!www\.)[^.]+).snaprate\.me$
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [L]
What do I need to add in order to redirect traffic from subdomain.snaprate.me/anypage
to snaprate.me/anypage
? I'd really like an answer to this; I have been searching for days and still I have no idea what to do -- htaccess is my Achille's heel!