Score:-1

htaccess Wildcard Redirect Passthrough (Web Hosting)

pk flag

I have hosting set up on a wildcard on my domain (*.example.com) and I would like to have the following type of redirect:

whatever-the-user-types-here.example.com > example.com/whatever-the-user-types-here

Does anyone know the code for this please? This would make my day if someone could help.

Thanks!

djdomi avatar
za flag
this is done via the Webservers configuration and not via htaccess, if i understood the or issue with such less information
Ryder Cragie avatar
pk flag
You need more information?
djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers. Basically said, a lot more ;) Or is your question not business environment or related to?
Ryder Cragie avatar
pk flag
Okay. I'll go through it one-by-one. The desired state is mentioned above. You can clearly see what it is I am trying to achieve. There is no error, but the problem is that it doesn't currently work in the desired state. The configuration is that a directory named "_wildcard_example.com" is present, and it is mapped to *.example.com in cPanel, and it is hosted by Proton Servers and LiteSpeed. Attempted solutions include me scowering the internet and not being able to come across any code for it. Let me know if you need anything else as I've hit the character limit.
djdomi avatar
za flag
offtopic question due cpanel involvement. Questions involving web hosting control panels are off-topic because they customize their systems so that standard system administration methods no longer apply. Some related topics may be asked on Webmasters
Ryder Cragie avatar
pk flag
So if it was my own web server that I'd set up from scratch, that would be allowed?
djdomi avatar
za flag
if it is in a relationship to a business environment and you are a professional business administrator, yes else you can either try on Webmasters or superuser.com
Ryder Cragie avatar
pk flag
Well, I'm not — unfortunately. But before its question gets closed, I thought I'd share this: https://RyderCragie.com/Image-30-05-2022.png. I have asked these types of questions on https://linux.org and they have answered me. I'll ask there instead. Bye and have a great day!
Ryder Cragie avatar
pk flag
Done. https://linux.org/threads/htaccess-wildcard-redirect-passthrough-web-hosting.40588/
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.