Jump to content
xisto Community
Sign in to follow this  
sonesay

Appended Link In Urls a different kind of appended links from get variables

Recommended Posts

I was viewing this site http://forums.xisto.com/no_longer_exists/ and noticed they use links in the address bar in an uncommon way. Is this kind of linking done by the CMS or web server level? I am trying to figured how this works and what language supports it. I have noticed all the pages seem to end in .html but are preceded by index.php first. I did not know this type of linking was valid as compared to the common appended get variables method. There are even some cases where deep linking is done with two or more parent folders. Any one familiar with this?

post-45102-1237176541_thumb.png

Share this post


Link to post
Share on other sites

Interesting site. :D

Any one familiar with this?

Yeah, i use it on my website (except i don't end it in ".html"). It's a built-in feature of PHP, which helps save resources that would normally be wasted by mod_rewrite. What it is doing in the background is passing arguments to the PHP script as if it were a CLI script. I should mention it is search engine friendly.
Here's how you can implement it:
$file = substr($HTTP_SERVER_VARS['PATH_INFO'], 1);
If you have a URL like /index.php/html/1, you could use it like:
list($category, $page) = explode("/", substr($HTTP_SERVER_VARS['PATH_INFO'], 1));

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.