Be a Supporter!

view/123456 - liljim?

  • 699 Views
  • 4 Replies
New Topic Respond to this Topic
bumcheekcity
bumcheekcity
  • Member since: Jan. 19, 2003
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
view/123456 - liljim? 2004-08-12 07:00:13 Reply

liljim, how do you do that view/123456 instead of the view.php?id=123456?

Is it a simple thing, that can be done in PHP, or did you have to use complicated stuff that I probably dont have on my site? And if it is simple, how is it done?

XSDSX
XSDSX
  • Member since: Nov. 13, 2002
  • Offline.
Forum Stats
Member
Level 22
Programmer
Response to view/123456 - liljim? 2004-08-12 09:02:02 Reply

What is happening is liljim as pointed you to a folder, not an actual php file. Once in this folder, the browser searches for the web page that is to be viewed, which in this case is the php file.

So it's got nothing to do with PHP itself :D

bumcheekcity
bumcheekcity
  • Member since: Jan. 19, 2003
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to view/123456 - liljim? 2004-08-12 09:50:49 Reply

At 8/12/04 09:02 AM, XSDSX wrote: What is happening is liljim as pointed you to a folder, not an actual php file. Once in this folder, the browser searches for the web page that is to be viewed, which in this case is the php file.

So it's got nothing to do with PHP itself :D

That's what I thought, but then I thought: All these folders have got to be created, and I didn't reckon there'd be hundreds of thousands of folders knocking around on a server someone in Tom's house, when there could just as easily be a little bit of information in a mySQL database.

Sir-Davey
Sir-Davey
  • Member since: Jul. 9, 2001
  • Offline.
Forum Stats
Supporter
Level 19
Blank Slate
Response to view/123456 - liljim? 2004-08-12 09:56:41 Reply

no.
He uses a PERL rewriteEngine.
Look for it on google.


BBS Signature
BurstStudio
BurstStudio
  • Member since: Dec. 27, 2002
  • Offline.
Forum Stats
Member
Level 12
Programmer
Response to view/123456 - liljim? 2004-08-12 11:23:45 Reply

You can do this with Apache given that you have the mod_rewrite module and configure your httpd.conf to load it. Then it's all a matter of using an .htaccess file in the folder with view.php:

RewriteEngine on
RewriteRule /view/([0-9]+) /view.php?id=$1