view/123456 - liljim?
- bumcheekcity
-
bumcheekcity
- Member since: Jan. 19, 2003
- Offline.
-
- Forum Stats
- Member
- Level 27
- Blank Slate
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
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
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
no.
He uses a PERL rewriteEngine.
Look for it on google.
- BurstStudio
-
BurstStudio
- Member since: Dec. 27, 2002
- Offline.
-
- Forum Stats
- Member
- Level 12
- Programmer
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

