aldrin151 Posted October 1, 2008 Share Posted October 1, 2008 Hello everyone, I'm trying build a website and trying to eliminate which parameters are being passed on the url address bar. I'm trying to convert my site which is mostly passing parameters and converting the parameters to sessions. I was wondering if this is a conventional way if I have many parameters for example http://192.168.0.101/test/user_search.php?title=&description=&category=Computer+Services&miles=30&sttileonly=on&FormListResults_Page=&mid=227 and also is there an easier way to eliminate the viewing of ?title=&description=&category and so on to the user on the address bar? Thanks Link to comment https://forums.phpfreaks.com/topic/126690-sessions-vs-parameters/ Share on other sites More sharing options...
hawkenterprises Posted October 1, 2008 Share Posted October 1, 2008 What your looking for is a marriage of PATH_INFO and mod_rewrite. You can take your url and make it http://<domainname>.tld/Computer_Services/search or something even more appealing to you. Try searching for Apache Mod_Rewrite on google. Apache has wonderful documentation but sometimes it's a little heavy for beginners. Link to comment https://forums.phpfreaks.com/topic/126690-sessions-vs-parameters/#findComment-655215 Share on other sites More sharing options...
aldrin151 Posted October 2, 2008 Author Share Posted October 2, 2008 Thank you very much for the info, I'm gonna look into it and see... Link to comment https://forums.phpfreaks.com/topic/126690-sessions-vs-parameters/#findComment-655231 Share on other sites More sharing options...
aldrin151 Posted October 2, 2008 Author Share Posted October 2, 2008 One more question, displaying the url on the address bar as http://<domainname>.tld/Computer_Services/search, would it also apply in someone doing a right click on the page and viewing the page address? Thanks Link to comment https://forums.phpfreaks.com/topic/126690-sessions-vs-parameters/#findComment-655866 Share on other sites More sharing options...
hawkenterprises Posted October 17, 2008 Share Posted October 17, 2008 A simple run down on how it works is as follows [*]Apache Receives Request for a Path (ie /Computer/Services) [*]Apache checks for any mod_rewrite rules affecting the path requested [*]Appropriate rewrite rules will feed the path into a query string of index file sitting at the top level of path [*]php parses index file which has path_info function to deal with what was sent [*]PHP display appropriate information Link to comment https://forums.phpfreaks.com/topic/126690-sessions-vs-parameters/#findComment-667993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.