|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
||||
|
||||
|
re write question
I am currently using php triad and i want to use the rewrite function. I wanted to know how to show:
/mysql/article name/ from: article.php?cat=11&id=123 I want to use the sam thing as devshed use, how would i do this, and is it possible using php triad??
__________________
--------- Linux...Macs.... there boring, they just work....... Windows users on the other hand have all the fun!! --------- PHP | MySQL | Apache | Zend |
|
#2
|
||||
|
||||
|
do you want to take articles from mysql db or from flat files? if flat files then you need a table where you'll have article id and what filename it points on. Then just select filename with requested id form the table and include it. If you're using mysql db then all you'll have to do it just select articles from the tabe with needed id and category.
did that make sense to anyone? ![]()
__________________
And you know I mean that. |
|
#3
|
||||
|
||||
|
i want to take the article from a MySQL database, but ur not really answering the question, sorry to sound bad, but that doesnt really help me, i want it to show /articles/mysql/blah blah/ instead of articles.php?cat=2&id=1234
I want to same thing that devshed use such as: /Server_Side/MySQL/PerfectJob2/ |
|
#4
|
||||
|
||||
|
it wasn't supposed to help :D
I dont think you can show url without actually 'being' there. I mean apache's url rewriting abilities won't help - you actully have to have those folders and files. I am not sure how its done on devshed, but you could write a script which on submition of every article you write will make a new specified folder and put files in it pointing on sql db with article.
Again, you better ask mods how its done here, but I would amagine something close to what I described. |
|
#5
|
|||
|
|||
|
>> i want it to show /articles/mysql/blah blah/ instead of articles.php?cat=2&id=1234
PHP user-friendly URL has been well-asked and answered in Apache forum. Do a search in Apache forum under my username with keywords like: RewriteCond, internal redirect. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > re write question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|