php - Does rewrite url affect the url in jquery? -


i trying use filename in jquery i'm facing problem file not found because of rewrite file?when tried using full url worked fine..

i tried did not work

 $.ajax({                         type: 'post',                         url: 'inentry.php',                         data: $("#myform").serialize(),                         success:function(data)                         {                          }                     }); 

i tried , work

 $.ajax({                             type: 'post',                             url: 'http://localhost/mgosoft/admin/inentry.php',                             data: $("#myform").serialize(),                             success:function(data)                             {                              }                         }); 

why i'm not able access file directly ? there problem htaccess file?

.htaccess

rewriteengine on rewritebase /mgosoft/admin/  rewritecond %{the_request} \ /+mgosoft/admin/index\.php\?p=([^\ &]+)&?([^\ ]*)  rewriterule ^ /mgosoft/admin/%1/?%2 [l,r]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)/$ index.php?p=$1 [l,qsa] 

for local version add

<base href="//localhost/mywebsite" /> 

to head section

and live versions change to

<base href="//your.domain.here" /> 

reference @ http://www.w3.org/tr/html4/struct/links.html#h-12.4


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -