Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello! I've seen pages like http://www.example.com/index.php/page/2/
and I want how know how to handle/process the "/page/2/" inside index.php and once I get and process the string I want to show the coresponding page to the user. Any ideas?
Posted
Updated 30-Aug-12 12:54pm
v4

Probabaly you mean URL mod_rewrite. For PHP you can do that with apache mod rewrite. See: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html[^]
 
Share this answer
 
The above link is broken and your question is not very clear. If you want to know how to create a website then try researching ASP.NET or similar.
 
Share this answer
 
Hi! I've found what I wanted with the print_r function.
For the ones who have my problem:

1.To make page like that imagine that www.example.com is our server
and www.example.com/index.php/page/2 is the desired page

2.In www.example.com/index.php get the value of $_SERVER['PATH_INFO'] which
will look like /page/2

3.Process the string(example: from "/page/2" tranform to "page2.html")

4.Load the actual page with include(for php page) or loadHTMLFile(for html page)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900