dzhax Posted June 25, 2010 Share Posted June 25, 2010 Well i was working on a project the other day and i was using a script i found that took a URL that would look like: www.website.com/?p=test&id=3&type=2, and made the url to also be able to work like this: www.website.com/test/3/2.Does anyone have a script to do that my computer for some reason did not save it and i am not able to find where it was posted online. Link to comment Share on other sites More sharing options...
niche Posted June 25, 2010 Share Posted June 25, 2010 It would be just as easy to the the appropriate string functions to edit an URL and save it to a variable or database.Here's an almost complete list of those functions to choose from: http://www.w3schools.com/php/php_ref_string.asp Link to comment Share on other sites More sharing options...
dzhax Posted June 25, 2010 Author Share Posted June 25, 2010 Well what i was talking about it that i had a script then when i was using the variables it would print out like $var[0], $var[1] and stuff like that. Link to comment Share on other sites More sharing options...
thescientist Posted June 25, 2010 Share Posted June 25, 2010 depending on the server, if its Apache, you would want to use .htaccess Link to comment Share on other sites More sharing options...
23.12.2012 Posted June 25, 2010 Share Posted June 25, 2010 You need to use Apache's RewriteEngine. PHP is only the processor (so it processes the URL, for example), it can't alter URLs. Link to comment Share on other sites More sharing options...
dzhax Posted June 26, 2010 Author Share Posted June 26, 2010 Could you give me a link on how to set it up.I no that my web server has it, but i am not able to find a tutorial on how to get it to work. Link to comment Share on other sites More sharing options...
Synook Posted June 26, 2010 Share Posted June 26, 2010 http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.