User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,894 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,906 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 328 | Replies: 1 | Solved
Reply
Join Date: Nov 2007
Posts: 11
Reputation: unixmonkey is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 2
unixmonkey unixmonkey is offline Offline
Newbie Poster

Path Style PHP Arguments

  #1  
Jun 30th, 2008
Hey All,
I've been googling and phping (doesn't quite sound as good) and I can't seem to find any references or even what it is called.
Here is my current situation:
We have a webserver running at production.company.com
In directories below that, we have web-applications such as
production.company.com/timeTracker
production.company.com/calculator
production.company.com/geneticCloner
etc (those are not real apps, btw. The last one interest me, though)

Each application has it's own files creating a "shell" around it. Each shell has a common look and feel across the server (so the timeTracker looks the same as the calculator except that the content is different).

We just found out that we are changing to a new format, and what I want to do is possibly develop a generic shell that can call the applications as requires or includes (I know that it will involve completely re-working a lot of the applications, but we will have to do that anyway). What I'm looking for is this:
I can currently do this:
production.company.com/index.php?app=timeTracker
and that will pull up the application with the new generic framework around it.
What I want to do instead is this, though:
production.company.com/index/timeTracker OR
production.company.com/timeTracker

If you're wondering "what is he talking about??" then you're probably not the only one.
I know that this is partly possible, most blogs use it for their archives.
http//blog.company.com/archive/2007/12/06

Can anyone tell me how this is done or tell me what it's called or point me the right direction?

Thanks Everyone!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: New York state
Posts: 468
Reputation: ShawnCplus will become famous soon enough ShawnCplus will become famous soon enough 
Rep Power: 5
Solved Threads: 71
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Path Style PHP Arguments

  #2  
Jun 30th, 2008
Actually that's accomplished quite easily with a little Apache voodoo known as ModRewrite. Lets say you are using the fake directory app
  1. RewriteEngine On
  2. RewriteRule ^app/(.*)/?$ /index.php?app=$1
Place that in the .htaccess file and it will be completely transparent to the user.
Last edited by ShawnCplus : Jun 30th, 2008 at 8:22 pm.
GCS d- s+:+ a-->? C++(++++) UL+++ P+>+++ L+++ !E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:18 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC