Rules for multiple subdomains, main domain, common folder.

CLOSED

Rules for multiple subdomains, main domain, common folder.

Postby aztech » Tue Feb 09, 2010 10:10 am

First of all: I'm completely new with mode rewrite, therefore almost everything is really complicated to me.

I've following problem.

I have main following domain and subdomains
www.maindomain.com
www.glob.maindomain.com
www.forum.maindomain.com

and following folder structure in my server:
root
|---main
|---blog
|---forum
|---common_framework

All subdomains points to root catalog.
Each application main, blog and forum in own index.php file has require('../common_framework'); command, cause they are using the same framework.
My question is following, how to write mor_rewrite in .htaccess in root, to:
1) point all requests from www.maindomain.com to main folder, but still displaying www.maindomain.com?
2) point all request from subdomain www.blog.maindomain.com to folder blo and still displaying www.blog.maindomain.com?
3) point all request from subdomain www.forum.maindomain.com to folder forum and still displaying www.forum.maindomain.com.

Note that framework is using: dirname(__FILE__), $_SERVER['SCRIPT_FILENAME']), $_SERVER['REQUEST_URI']), $_SERVER['HTTP_HOST'], $_SERVER['SERVER_NAME'] and $_SERVER['PHP_SELF']

I've stuck with this for a long time and I don't have any idea how to solve this :(
aztech
 
Posts: 1
Joined: Tue Feb 09, 2010 9:54 am

Return to New Threads/Problems

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron