Jump to content
php.lv forumi

ajax un mod_rewrite


Cinis

Recommended Posts

.htaccess saturs:

RewriteEngine on
RewriteRule ^([^/\.]+)/?$ ?action=$1 [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ ?action=$1&job=$2 [L]

jacascript saturs:

  $('.delete').live("click",function() {
    var ID = $(this).attr("id");
    var dataString = 'user_id=' + ID;
    $.ajax({
      type: "POST",
      url: "include/delete.php",
      data: dataString,
      cache: false,
      success: function(html)
        {alert(html);}
    });
  });

links kurā atrodos:

http://127.0.0.1/list/users

Lieta tāda, kad ir 1.links, tad nestrādā, bet kad 2.links tad viss strādā un ir pa smuko.

Kur jāmeklē problēma?

jo url: "include/delete.php", pieliku priekšā "/" arī tas nestrādā ;(

 

jau iepriekš paldies

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...