Reputation: 2035
I'm writing a Wordpress/AJAX based SAP web application, and I have a question about URL handling.
My application (roughly) looks like this:
index.php
file which basically contains a page container and the client-side code to handle ajax calls.get_about_page()
that prints/returns the HTML of the requested page)The problem with this setup is handling URLs.
The question at hand is how do I handle requests to URLs like http://domain.com/about
, for example?
Had I had an about.php
page, I could add a rewrite rule to direct all requests there.
I could also, theoretically, parse the URL on the client-side, and decide which ajax call to fire, but that seems like a bad idea.
Upvotes: 2
Views: 254