chapeen Posted December 31, 2008 Share Posted December 31, 2008 I have a page where users can register. I use ajax. http.open('get', 'RegisterUser.php?nombre='+nombre+'day='+dy+'month='+mnt+'year='+yr+'sex='+sex+'email='+email+' &password='+psw+'&nocache = '+nocache); When I press on my submit button I get the message "The requested URL /page/RegisterUser.php was not found on this server." This is what I have in the .htaccess page RewriteEngine On RewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 Can someone help, is there an extra rule to put on htaccess page ? What am I doing wrong ? Quote Link to comment https://forums.phpfreaks.com/topic/139053-apache-and-ajax/ Share on other sites More sharing options...
corbin Posted January 1, 2009 Share Posted January 1, 2009 Does the page exist without the rewrite? Also, it looks like you're putting together your query string wrong, although I don't think that's the problem. But errr.... Would there be some reason your rewrite rule isn't applying? Quote Link to comment https://forums.phpfreaks.com/topic/139053-apache-and-ajax/#findComment-727368 Share on other sites More sharing options...
chapeen Posted January 2, 2009 Author Share Posted January 2, 2009 The page does exist and could it be that I should put my query as follows? http.open('get','/page/RegisterUser/?nombre='+name+'&day='+dy+'&month='+mnt+'&year='+yr+'&sex='+sex+'&email='+email+'&password='+psw+'&nocache='+nocache) When I do so , my index.php shows up as shown in the screenshot. What would be right way to call my page using ajax and that also respects my htaccess rule ? can somebody help ? [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/139053-apache-and-ajax/#findComment-727803 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.