Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 23rd, 2006, 06:35 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
I don't even know what this is called

Hello,
I want to make the following changes:
curently I display articles on my website by:
articles.php?id=#
where # changes with different article.

However, I do know that there is a way of organising it so that it can displayed in the following manner:
articles.php/article/#
or
articles.php/#

i'm using apache on unix.

Please help as i don't even know where to begin to look for such a solution!!!!!!!!! I'm not even sure what this is called. I came across perminks and symlinks when i searched google but they weren't any help....

Thank you in advance

Reply With Quote
  #2  
Old June 23rd, 2006, 06:37 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: I don't even know what this is called

Sorry I meant to say Linux not Unix.

Reply With Quote
  #3  
Old June 23rd, 2006, 09:13 AM
gfather gfather is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Lubertsy, Russia
Posts: 38 gfather User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 23 m 2 sec
Reputation Power: 2
Send a message via ICQ to gfather
RE: I don't even know what this is called

try to use -> mod_rewrite

Reply With Quote
  #4  
Old June 23rd, 2006, 12:42 PM
tkarkkainen's Avatar
tkarkkainen tkarkkainen is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: Finland
Posts: 2,326 tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)tkarkkainen User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 16550 Folding Title: Novice Folder
Time spent in forums: 6 Days 9 h 39 m 34 sec
Reputation Power: 4
RE: I don't even know what this is called

Yes, mod_rewrite is what you need. http://codewalkers.com/faq/4/13.html might get you started. I think there was also some kind of discussion about this under General Chat.

Reply With Quote
  #5  
Old June 23rd, 2006, 04:37 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: I don't even know what this is called

Thank you So much!!

That really helped. Looks like i'll have to look into this mode_rewrite thing more...

final question, so there is no way implementing this through php? Because I might have copy of this website also running on a microsoft web server as well as apache. If not, i'll just try to get the second web server to be apache as well.

thanks for the great response guys.

Reply With Quote
  #6  
Old June 23rd, 2006, 09:54 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information. Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,943 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 5 h 8 m 21 sec
Reputation Power: 3
RE: I don't even know what this is called

Im sure there will be something similar for Microsoft Webserver software, there has to be. Do some googling, also im pretty sure it cant be done through php as your dynamically rewriting the query. But i maybe wrong.

Reply With Quote
  #7  
Old June 23rd, 2006, 09:55 PM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Programming Theory' by andrew.

Reason: Might be better placed here considering its not really related to php i dont think

Reply With Quote
  #8  
Old June 24th, 2006, 11:13 AM
jcaughel jcaughel is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Buffalo, NY, USA
Posts: 283 jcaughel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 4 sec
Reputation Power: 2
Send a message via ICQ to jcaughel Send a message via AIM to jcaughel Send a message via Yahoo to jcaughel
RE: I don't even know what this is called

You can manually parse $_SERVER['REQUEST_URI'] and get the information you are looking for from there.

-Jeff

Reply With Quote
  #9  
Old June 26th, 2006, 12:17 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,727 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 4 m 45 sec
Reputation Power: 6
RE: I don't even know what this is called

Only way I can think of doing it with PHP is a hack around. You have a URI like:
Code:
articles.php/art1/doda/


then in articles.php you can take the $_SERVER['QUERY_STRING'] explode it on the slash and use the vars to send a header redirect to what ever page you want... but that means that articles.php has to handle everything... I can think of some performance issues with that.

Reply With Quote
  #10  
Old June 26th, 2006, 02:53 AM
jcaughel jcaughel is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Buffalo, NY, USA
Posts: 283 jcaughel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 4 sec
Reputation Power: 2
Send a message via ICQ to jcaughel Send a message via AIM to jcaughel Send a message via Yahoo to jcaughel
RE: I don't even know what this is called

Wouldn't QUERY_STRING return only what was after the '?' character?

Reply With Quote
  #11  
Old June 26th, 2006, 11:34 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,727 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 1 h 4 m 45 sec
Reputation Power: 6
RE: I don't even know what this is called

I was told it will return anything after the page.

Reply With Quote
  #12  
Old July 26th, 2006, 09:43 PM
mousy mousy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 31 mousy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: I don't even know what this is called

I'm pretty sure it works.

You could use 404 page to get the data if you need it.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > I don't even know what this is called


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway