I realised that invalid sub-subdomains are redirected to a parking page. So I decided to set up a wildcard for *.files.rydercragie.com. It works on desktop, but not on mobile. Any ideas why?
Example link: http://test.files.rydercragie.com
I realised that invalid sub-subdomains are redirected to a parking page. So I decided to set up a wildcard for *.files.rydercragie.com. It works on desktop, but not on mobile. Any ideas why?
Example link: http://test.files.rydercragie.com
Did you try my suggestion from the previous topic? You can also do this with Cloudflare.
Put this in your .htaccess files, and remove whatever you just did.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(files\.)? rydercragie.com$ [NC]
RewriteRule ^(.*)$ http://rydercragie.com/$1 [L,R]
Clear your cache and try again.
The .htaccess file already had some data in it, so I added your code to the bottom of it.
Also, I do not use Cloudflare.
It’s not working yet. Does it take time?
Try deleting the middle line.
This one?
RewriteCond %{HTTP_HOST} !^(files.)? rydercragie.com$ [NC]
Where and how exactly? Our control panel doesn’t support wildcard subdomains.
Via my domain registrar. (Google Domains). But I’ve deleted that wildcard now. I’m trying what GreenReader said, although that doesn’t seem to be working either.
That answer the “where” questions, but not the “how” question.
I assume you added this as a DNS record to the DNS settings at Google?
If so, please note these limitations:
This is not something that can be fixed with .htaccess rules. .htaccess rules are very powerful, but if the server isn’t configured to load those .htaccess rules of a particular domain name, they won’t do anything.
Why does it work on desktop then with a wildcard?
It is working everywhere, except for when the URL includes “.files.”
Yes, try removing that and clearing your cache. If it stops working completely, change “files” to “vrjbauvbwvbraebvuhresevknkwrbaionvpr”.
But it does seem to be working. I think the .htaccess rule might be getting the URL before parking page is set, than redirecting it.
Why that set of letters specifically?
It doesn’t matter what letters, just something that no one will ever type into the URL bar. Try just removing the line first, and only replace “files” as a last resort.
Okay. I removed that 2nd line.
Clear your cache, and try going to test.files.rydercragie.com (I would try it, but I cannot clear the cache on the computer I am using).
I don’t want to do that on my main machine so I’ll boot up a VM.
Edit: Nope. It still goes to the parking page — even on the desktop site. I’ll try changing “files” to something else.
Edit 2: Even after changing “files” to gibberish and clearing the cache once again, it still won’t work.
At this point I’ll do anything. I’m happy to try Cloudflare, but bear in mind that I’ve never used it.
Try replacing “files” with gibberish. If it doesn’t work, you will have to try Cloudflare.
Didn’t I already do that?
Mis interpretation I guess. I thought you meant in the URL.
For Cloudflare, set it up using guide #1, than use guide #2 to setup the catch-all.
Guide #1: