I want to do something similar to WordPress's permalinks, but rather that rewriting all non-existing files and folders to index.php, rewrite subdomains to folders on a separate domain. An example of what I want is:
- User goes to http://osd1.sd1.msd.example.com
- Server checks if /var/www/example.com/sc/msd/sd/sd1/osd/osd1 exists
- If yes: show /var/www/example.com/sc/msd/sd/sd1/osd/osd1
- If no: redirect user to http://msd.example.com (which displays /var/www/example.com/sc/msd)
Basically, I am trying to create a dynamic game site setup where you go to {corp_ticker}.{alliance_ticker}.eve.example.com. I really don't want to manually add everything, so I am looking at making it dynamic with mod_rewrite. I tried looking it up, but my Google fu is still in padawan level :-P so if it has been answer somewhere before I am sorry. I was going to try adapting the WordPress htaccess file and stuff I found in my search to what I am trying to do, but I can't seem to grasp the mod_rewrite stuff enough to adapt it to my needs like I do with other code.
I hope I made sense there... If you need clarification let me know and I will try to clarify.
[edited by: incrediBILL at 11:54 pm (utc) on Aug 3, 2014]
[edit reason] unlinked URL [/edit]