troubleshooting Question

Parse part of a path and redirect to another domain with that part

Avatar of bider2k
bider2k asked on
Web Languages and StandardsJavaScriptjQuery
7 Comments1 Solution255 ViewsLast Modified:
I have 2 domains: example1.com and example2.com.  

On example2.com there are a bunch of vanity urls like example2.com/first.middle.last for thousands of people.  

But, users keep going example1.com looking for the vanity urls, which don't exist there.  

I need to figure out how to redirect users who go to example1.com looking for those vanity urls to example2.com with the vanity url --- without setting up the thousands of redirects on example1.com.  

I don't have access to the server, so I'm thinking a javascript solution would work best.  Some JS on the error page of example1.com that would parse the URL for the /first.middle.last pattern and redirect them to example2.com/first.middle.last.  

ASKER CERTIFIED SOLUTION
uk44

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros