Webmastersite.net
Register Log In

subdomains and url masking
what would you do?

Comments on subdomains and url masking

david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Mar 16, 2006 - 4:11 PM:

Hey Paul,

Here is my dilemma:
I got a WSN installed on www.domain.com . I have multiple subdomains here, such as bob.domain.com, steve.domain.com, etc. These are all usernames (members) in my database.

My original idea was to have all bob's links accessible by simply going to bob.domain.com. First, I thought of simply generating static html pages of their link lists and their actual link details, and put them into the 'bob' directory on the server (the one that houses the subdomain). This is all nice and dandy, no problem.

BUT, what to do with searching? Suppose I get a member who has 1000 links. Even if I put the search form on that static index page I generated for his links for example, the results would bring the visitor all the way back to www.domain.com/search.php?.....

SO, is there a way to keep a visitor who first visited bob.domain.com, ON bob.domain.com, no matter what php is actually accessed?

I was thinking of generating static pages for all possible search results for the member, OR some kind of Rewrite Rule (no idea about them), OR a copy of the needed php files in the directory that houses bob's subdomain, then have them use the main WSNLINKS database. How would you do that? Should I just simply install the WSN in each subdomain? In this case, is that ok with you? If so, how do I make sure that it uses the original WSNLINKS database?

If Rewrite rules are the way to go, then:
1. how do I tell htaccess what subdomain the visitor is on, and then include that in the Rewrite rule as well? (you already answered an old post of mine about how to grab the URL you are on, but not for the htaccess)
2. how do I Rewrite evertyhing that starts with search.php, ONLY if the search string contains a MEMBERID variable, AND make sure the the visitor is kept on that MEMBERID's username.domain.com??

(if any of this made sense, let me know)

Thanks
David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Mar 16, 2006 - 4:41 PM:

I was even thinking of having the search function on that static index.html page in the 'bob' subdomain directory, then somehow have that form fetch the results, automatically somehow generate a searchresult.html static page with the results on it, then take the visitor to that page.

OR using javascript, embed only the search fields and the result into the static page.

David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Mar 17, 2006 - 11:30 PM:

Any thoughts anybody?

smiling face nod
mrowton
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan

Total Topics: 57
Total Comments: 185
mrowton
Posted Mar 18, 2006 - 1:20 AM:

Like this?
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Mar 18, 2006 - 7:19 AM:

Interesting. I did search through the manual for this, but couldn't find it. I'll try that option.

Much appreciated.

David
david
Forum Regular

Usergroup: Customer
Joined: Jun 22, 2005

Total Topics: 91
Total Comments: 305
david
Posted Mar 18, 2006 - 3:02 PM:

Small question. Can I just copy the index.php, search.php and the classes directory, along with the modified config file and expect it to work? Or do I have to actually perform an install? I mean, technically an installation does nothing more than create the database tables and modified the config file, no?

David
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 18, 2006 - 8:08 PM:

I don't see how the sql condition option relates, but I don't understand the situation very well either.

If I understand, the issue is the URL in the browser address bar? Not anything to do with what said page looks like or does? If so I expect htaccess has a way to do that which could be googled, though I'm not any good with regex or htaccess personally.

Small question. Can I just copy the index.php, search.php and the classes directory, along with the modified config file and expect it to work?

If the files are there and the config.php points at valid database info, it works. Just index.php and search.php and classes alone, however, would not work as they wouldn't be able to find all the files they depend on.

an installation does nothing more than create the database tables and modified the config file, no?

Correct (well actually if permissions allow it it'll also copy the language files).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.