Jump to content

Url Manipulation?


attila2452

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...