WildCard Goes Here
WildCard Goes Here

Reputation: 13

How do I test wildcard domain logic

Here is an interesting problem... I have configured wildcard domains on my production site and will be using it as a customer identifier. This allows me to display the right banner/css/logos for each customer simply be pulling out the wildcard prefix (eg. CompanyABC.website.com will be displayed the logos and branding related to CompanyABC).

But how do I test this on my local Visual Studio 2010 installation? In production the site loads COMPANY.website.com etc., but locally I can only use the flat http://localhost address.

Upvotes: 1

Views: 307

Answers (3)

Gian Santillan
Gian Santillan

Reputation: 773

Just get one more computer. I would prefer one more laptop. Make the IP dynamic and test it there. Results would give higher and accurate results, since your not testing different IPs on the same computer.

Upvotes: 0

Torben Koch Pløen
Torben Koch Pløen

Reputation: 977

Put the relevant code in a separate class and create a unit test for it.

Upvotes: 0

Greg
Greg

Reputation: 23463

Hosts file?

127.0.0.1 companyabc.website.local

Upvotes: 1

Related Questions