2

I am studying php routing material now, but I still can't understand the theory. Does anyone here have good tutorials or links to share?

3
  • Please explain what you mean by PHP URL routing. Doesn't your web server just directly map the URL to a filesystem path, then execute said .php script? Commented Jan 6, 2011 at 19:11
  • my bad. its a method that change url like www.testphp.com/post?id=1234567 to www.testphp.com/post/123467....they called it web2.0 technology and it will make the url look better than just scribbles. Commented Jan 6, 2011 at 19:24
  • PHP simply has nothing to do with URL routing. It's HTTP server's job. it is also called not Web2.0 but SEO friendly urls and you can find a darn load of tutorials already written here in great numbers. You can't even imagine how many times this very question been answered on this site Commented Jan 6, 2011 at 19:26

2 Answers 2

2

You are talking about url rewriting, and there are many other questions about that on here if you search for that term.

Regardless, url rewriting isn't handled by PHP, it's done by the web server. If you are running PHP under Apache, then you'll want to have a look at mod_rewrite. For IIS, you would look into the IIS Rewrite module (which conveniently can import mod_rewrite rules from apache as well)

Sign up to request clarification or add additional context in comments.

Comments

-1

Take a look at this: Url Routing with PHP

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.