attila2452 Posted July 26, 2009 Share Posted July 26, 2009 ok so here is an example of what i am trying to do.http://cityandcolour.ca/home/when you navigate through that website, instead of theending saying ?page=home it uses slashes for the url.how do i do what ! Link to comment Share on other sites More sharing options...
smerny Posted July 26, 2009 Share Posted July 26, 2009 looks like they just have a bunch of folders... when you see ...ca/home/you are actually seeing ...ca/home/index.html (or .php) Link to comment Share on other sites More sharing options...
Ingolme Posted July 26, 2009 Share Posted July 26, 2009 looks like they just have a bunch of folders... when you see ...ca/home/you are actually seeing ...ca/home/index.html (or .php)That is possible, but it's more probable that they're using server-side technology to rewrite the URL. It's much easier to manage than folders for every page. Search for mod_rewrite to find more information. Link to comment Share on other sites More sharing options...
attila2452 Posted July 26, 2009 Author Share Posted July 26, 2009 ok there is a tutorial on CSS-tricks and this is what the guy used (the tutorial that was used was not about this!) <?php $page = $_SERVER['REQUEST_URI']; $page = str_replace("/" , "", $page); $page = str_replace(".php" , "" , $page); $page = str_replace("?s=" , "" , $page); $page = $page ? $page : 'default'?> but it doesn't seem to work for me. im going to keep searching but im looking for something relatively like this. Link to comment Share on other sites More sharing options...
Synook Posted July 27, 2009 Share Posted July 27, 2009 That's the PATH_INFO method - mod_rewrite is more flexible. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html Link to comment Share on other sites More sharing options...
attila2452 Posted July 27, 2009 Author Share Posted July 27, 2009 That's the PATH_INFO method - mod_rewrite is more flexible. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html you know what, thanks a lott i really appreciated it but now that i know how much work it can be. it was a great experience. but ill stick to what i have now.thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.