|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
RE: I don't even know what this is called
Sorry I meant to say Linux not Unix.
|
|
#3
|
|||
|
|||
|
RE: I don't even know what this is called
try to use -> mod_rewrite
|
|
#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.
|
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
|||
|
|||
|
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 |
|
#8
|
|||
|
|||
|
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 |
|
#9
|
||||
|
||||
|
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. |
|
#10
|
|||
|
|||
|
RE: I don't even know what this is called
Wouldn't QUERY_STRING return only what was after the '?' character?
|
|
#11
|
||||
|
||||
|
RE: I don't even know what this is called
I was told it will return anything after the page.
|
|
#12
|
|||
|
|||
|
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. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > I don't even know what this is called |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|