www.XYZ.com -> www.XYZ.com/index.php?page=XYZ

Using a single web hosting account to host multiple sites

www.XYZ.com -> www.XYZ.com/index.php?page=XYZ

Postby RealmWorx » Fri Sep 01, 2006 7:19 am

I've looked in the forum for about 2 hours now ... and maybe I just don't know what to search for, but I'm not finding what I need. While I keep looking, I 'd apprecaite any help.

Problem: I have multiple domains that I'm trying to filter into 1 forum (vBulletin "per domain" coss are killing me). I'd like them maintain their own images, files, css, js directories. The forum directory is a symlink (ln) to the main forum directory (if that's the right way to do it).

Example:

URL: www.domain.com
Shows: www.domain.com
Load information from www.maindomain.com/index.php?page=domain

Show work for all instances of domain:
URL: www.(.*).com
Shows: www.(.*).com
Load from: www.maindomain.com/index.php?page=(.*)


Sub Folders (images|js|css|files)
URL: www.domain.com/(images|js|css|files)
Shows: www.domain.com/(images|js|css|files)
Loads from: www.domain.com/(images|js|css|files)

Sub Folders (forum)
URL: www.domain.com/forum
Shows: www.domain.com/forum
Loads from: www.maindomain.com/forum *

*symlink, so it shouldn't matter.

Any thoughts? Thanks in advance!
RealmWorx
 
Posts: 4
Joined: Fri Sep 01, 2006 6:49 am

Postby richardk » Fri Sep 01, 2006 7:36 am

So you want to add page= just for */ and */index.php?
Code: Select all
Options +FollowSymLinks

RewriteEnigne On

RewriteCond %{QUERY_STRING} ^(.*&)?page=
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.[^\.]+$ [NC]
RewriteRule ^(index\.php)?$ /index.php?page=%2 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby RealmWorx » Fri Sep 01, 2006 8:02 am

I tried that, and it didn't work (I corrected the spelling error in RewriteEnigne On). It actually didn't do anything.

Here's a step by step of what I'm doing, and the results I'm expecting.

I'll just use real domains :)

www.hrcrealms.com has the following directory structure:
/images/
/files/
/forum/ -> symlink to www.cmgrealms.com/forum/

When I go to www.hrcrealms.com, the main index for it is actually at www.cmgrealms.com/index.php/index.php?page=hrcrealms , but I just want it to show www.hrcrealms.com .

hrcrealms should a variable.
RealmWorx
 
Posts: 4
Joined: Fri Sep 01, 2006 6:49 am

Postby richardk » Fri Sep 01, 2006 8:16 am

I also missed a "!":
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} !^(.*&)?page=
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.[^\.]+$ [NC]
RewriteRule ^$ /index.php?page=%2 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 22 guests

cron