title: Ajax call to php not found, 404 error
body: <p>I'm trying to build my own WordPress theme and it seems to work but I'm having problems with my email form. The code worked when I used it before adapting to WordPress but now it doesn't.</p>
  
  <pre><code>$(function() {
  $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
      preventSubmit: true,
      submitError: function($form, event, errors) {
          // additional error messages or events
      },
      submitSuccess: function($form, event) {
          // Prevent spam click and default submit behaviour
          $("#btnSubmit").attr("disabled", true);
          event.preventDefault();
          console.log ('1');
  
          // get values from FORM
          var name = $("input#name").val();
          var email = $("input#email").val();
          var phone = $("input#phone").val();
          var message = $("textarea#message").val();
          var firstName = name; // For Success/Failure Message
  
          // Check for white space in name for Success/Fail message
          if (firstName.indexOf(' ') &gt;= 0) {
              firstName = name.split(' ').slice(0, -1).join(' ');
              console.log ('2');
          }
  
          $.ajax({
              url: "./mail/contact_me.php",
              type: "POST",
              data: {
                  name: name,
                  phone: phone,
                  email: email,
                  message: message
              },
              cache: false,
              success: function() {
                  // Enable button &amp; show success message
                  console.log ('3');
  
                  $("#btnSubmit").attr("disabled", false);
                  $('#success').html("&lt;div class='alert alert-success'&gt;");
                  $('#success &gt; .alert-success').html("&lt;button type='button' class='close' data-dismiss='alert' aria-hidden='true'&gt;&amp;times;")
                      .append("&lt;/button&gt;");
                  $('#success &gt; .alert-success')
                      .append("&lt;strong&gt;Your message has been sent. &lt;/strong&gt;");
                  $('#success &gt; .alert-success')
                      .append('&lt;/div&gt;');
  </code></pre>
  
  <p>The JavaScript file is in this route: <code>domain/wp-content/themes/federo/js/contact_me.js</code></p>
  
  <p>And the PHP file is here: <code>domain/wp-content/themes/federo/mail/contact_me.php</code></p>