.htaccess code and wildcard redirect - apache

Sorry if this topic is not unique, but believe me, I've searched alot.
I've a website that users can subscribe and have a unique web page for themselves with address like this:
http://website.com/api/username
Now, I want to make them able to access their pages using addresses like this:
http://username.website.com
In fact, username comes here as a subdomain.
and I know I have to add a wildcard a record (* as name and website IP as address). I've made this changes.
But I couldn't find any .htaccess code working for my problem.
could you help me please?
Thanks in advance.

Related

Can I send an email with a hyperlink to a different domain (website) that doesn't match my email domain?

Bear with me because I'm still learning about this. My description will probably be long. And please talk to me like a newbie:
My plan is to get multiple domains and through that, create multiple Google Workspace email accounts to send emails to different prospects in my emailing list.
On the emails that I send out from different email domain accounts, I was planning on just adding a link/hyperlink to my website for the recipients to click on & browse.
If I did that, would that ruin my reputation in the eyes of ISP? I fear that because my email domain doesn't match the website domain I'm hyperlinking will lower my reputation score. My fear is that I'll get blacklisted, get marked as spam, and many bad things, if I do it this way.
Thank you in advance for putting up with the long description. It's the best way for me to explain the situation.
I saw an article that says if my email domain and the domain being hyperlinked in the email message doesn't match, it's fine. It just depends on the hyperlinked domain's reputation and what I write on the hyperlink text (not misleading).
But I am just making sure by writing my question here.
And I think there is another way that might work, if this is not recommended:
Have the hyperlinked domain (website) to match with my email domain by connecting those multiple domains (that are used in my email accounts) to my primary domain (website).
Does that make sense?
Let me know if ANY OF THIS makes sense. Sorry again for my ignorance.

Masking Sub-domain with primary domain

I'm not sure if this possible but here goes.
So I have a bunch of sites which accessed via different sub domains. Each sub domain is created to serve Geo-located users. However, we do not want to the sub domains to be customer facing as they are not desirable and we believe all customers should access from the same one url point.
Therefore we desire that all traffic is ran through and masked by the primary either through an htaccess or a web app. Any suggestions would be greatly appreciated.
Since you placed the tag Shopify in your answer, the short answer there is, Shopify already geo-locates your customers to the fastest server for their location. You cannot do that yourself, or, in other words, they probably do it better than you could anyway.
If you don't mean Shopify, then your question is one of DNS and co-location of server boxes around the world, a topic pretty heavy for one answer here.

Display Domain suggestions having keywords appended in suggestions - WHMCS domain checker

I'm working on WHMCS Latest Version 7. On submitting domain checker form, usually we get the domain availability information and domain suggestions with other extensions. For example: If we search for example.com, We will get a set of suggestions as follows.
example.net
example.org
I need another set of suggestions with some set of words appended with the keyword user selected as follows
theexmaple.net
myexample.net
exmapleonline.net
theexmaple.org
myexample.org
exmapleonline.org
Domain suggestions are implemented by Domain Registrar modules. You can use eNom or ResellerClub for their built in suggestions. Both of those will attempt to use related words in the name to get a better suggestion. If you want behavior exactly like you described, you can write a custom domain registrar module that adds the common prefixes and suffixes you're interested in and then returns results.
http://developers.whmcs.com/domain-registrars/availability-checks/

Planning url rewrite for my web app

I'm working on a site which shows different products for different countries. The current url scheme I'm using is "index.php?country=US" for the main page, and "product.php?country=US&id=1234" to show a product from an specific country.
I'm planning now to implement url rewrite to use cleaner urls. The idea would be using each country as subdomain, and product id as a page. Something like this:
us.example.com/1234 -> product.php?country=US&id=1234
I have full control of my dns records and web server, and currently have set a * A record to point to my IP in order to receive *.example.com requests. This seems to work ok.
Now my question is what other things I'd need to take care of. Is it right to assume that just adding a .htaccess would be enough to handle all requests? Do I need to add VirtualHost to each subdomain I use as well? Would anything else be needed or avoided as well?
I'm basically trying to figure out what the simplest and correct way of designing this would be best.
The data you need to process the country is already in the request URL (from the hostname). Moving this to a GET variable introduces additional complications (how do you deal with POSTs).
You don't need seperate vhosts unless the domains have different SSL certs.

Language name in prestashop URL

my prestashop base site URL is - www.7color.eu. Some urls are showing in this way -
http://7color.eu/lang-en/12-t-shirt.html
http://7color.eu/lang-en/5-gift-item
http://7color.eu/lang-en/content/4-about-us and so on
But it was not like this. "lang-en" part was not in it. i don't understand when and how did it happen. Now i cannot remove this part. i tried to edit htaccess or re-generate it from admin. but no luck. i want the urls like -
http://7color.eu/12-t-shirt.html
http://7color.eu/5-gift-item
http://7color.eu/content/4-about-us etc.How can I do this? i need urgent help please.
I think perhaps it has to do with enabling the nice URL strings.