title: codeigniter get URL after ajax
body: <p>I am trying to get the URL i see on my browser after i do an ajax request but the problem is that it changes the URL with the Ajax URL.</p>
  
  <p>ex.</p>
  
  <p>i am on <code>domain.com/user/username</code></p>
  
  <p>and the ajax URL that i call is in <code>domain.com/posts/submit</code></p>
  
  <p>when i echo $_SERVER['REQUEST_URI'] on the posts controller in submit function it will display the second URL and not the first... how can i assure and get the first inside the ajax function that its 100% valid and not changed by the user to prevent any bad action?</p>
  
  <p>Thanks</p>