php - Prevent htaccess from affecting ajax requests -
i'm trying modify htaccess request, loads files php, removes .php extension. noticed affects ajax requests, cannot post data them. add htaccess prevent specific php(data.php) not being affected extension removal of htaccess?
the code of htaccess:
rewriteengine on # browser requests php rewritecond %{the_request} ^[a-z]{3,9}\ /([^\ ]+)\.php rewriterule ^/?(.*)\.php$ /$1 [l,r=301] # check see if request php file: rewritecond %{request_filename}\.php -f rewriterule ^/?(.*)$ /$1.php [l]
may sending data on post check in htaccess if url data ignore rewrite or use post url in ajax without php extension url/data
url: data, //instaed of data.php
Comments
Post a Comment