jquery - URL of server.php/123 still received by server.php -
so have been fiddling around backbone.js today , thinking how php code work ajax requests this:
$.ajax({ url : "server.php/123", data : "empty string", type : "post" // or "get" - interested in both }); just messing around, discovered if above url sent, "server.php" still receives request. surprised see this, expected need sort of mod_rewrite nonsense work.
based upon discovery, have couple of questions:
- is common most/all servers? i'm running wamp localhost zend.
- is possible, in
server.php, access information sent after "/" without doing mod_rewrite stuff (e.g., call of "server.php/123" want access "123" server.php). realize that, in backbone's case, sends information part of json, me trying learn how php works.
yes, common, , yes can access it:
$url_parts = explode('/', $_server['request_uri']); print_r($url_parts);
Comments
Post a Comment