Guest User

Untitled

a guest
Dec 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. http://local.api.com/api/orders/1/notes
  2.  
  3. # Turn on the rewrite engine
  4. RewriteEngine on
  5. # If the request doesn't end in .php (Case insensitive) continue processing rules
  6. RewriteCond %{REQUEST_URI} !.php$ [NC]
  7. # If the request doesn't end in a slash continue processing the rules
  8. RewriteCond %{REQUEST_URI} [^/]$
  9. # Rewrite the request with a .php extension. L means this is the 'Last' rule
  10. RewriteRule ^(.*)$ $1.php [L]
  11.  
  12. $segments = explode('/', trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'));
Add Comment
Please, Sign In to add comment