|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Here's the situation: we have a codebase for a store, let's say it exists at:
/webroot/code/store/ We have multiple stores to work off of this single codebase, so what we have is this: http://www.website.com/stores/store1/ http://www.website.com/stores/store2/ http://www.website.com/stores/store3/ Basically, anytime a URL is called that contains that "/stores/" part, we want to serve off of that single codebase - but retain the "store1" part so we can do a database lookup to see which store we are handling. I'm not an apache wiz by ANY stretch of the imagination, so if anybody could shed some light on how to do this, I would greatly appreciate it! Thanks! |
|
#2
|
||||
|
||||
|
It probably depends in part on how the codebase works. The quick and easy way to handle this would be to have "stores" be not a directory but a script. That would make "/store1/" PATH_INFO, an environment variable you could pass along to the codebase to determine which database to use. No need even to fiddle with apache if you go this route. In this case, "stores" simply becomes a wrapper around your codebase. I'm not sure how PHP deals with path info, but I know perl handles it very cleanly.
|
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Help with Apache/Directories |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|