Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've done searching for my answer and have tested a few solutions, but nothing has worked so far.

I'm trying to get a URL like this http://baseball.sports.com to rewrite to http://pro.sports.com/baseball-index.php.

However, I still need to keep the domain the same (http://baseball.sports.com). The reason being I have about 5 subdomains (baseball, football, soccer, etc.) that I want to run off the same code base (pro.sports.com).

Everything is on the same server. I'd be happy to answer any other questions that would help me get a resolution.

I truly appreciate any direction that can be given to me to solve this.

share|improve this question
    
What are the solutions you have tested already but didn't work? –  Henning Makholm Nov 5 '12 at 21:06
    
Where is the webroot for baseball.sports.com and pro.sports.com? Are they the same directory? –  Jon Lin Nov 5 '12 at 23:38
add comment

migrated from stackoverflow.com Nov 12 '12 at 8:57

This question came from our site for professional and enthusiast programmers.

2 Answers

I don't think rewrite rules actually work across sub-domains, even on the same server.

You could use mod_proxy to make this happen. Configure baseball.sports.com to proxy the information that you want from the other subdomain.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.