How to send value in ajax jquery in php htaccess without dot php

Description

send value in php with ajax jquery and used htaccess without .php rewrite rules used in php in htaccess url rewriting in php using .htaccess example

I am used url rewriting rules in php and now I have send the value one file to another file with ajax jquery php and used htaccess

and error shoe page not found in google chrome console press f12

 

send value in ajax jquery in php htaccess without dot php

 

Solution

 

google chrome console press f12 show url

 

this is your file name commentansfilename.php

 

Frst access direct copy url link and paste in url

 

Show url page not found just like

 

http://www.localhost/domain/id/89/commentansfilename

 

So now I want to Access this main file commentansfilename.php like this

 

http://www.localhost/domain/commentansfilename

 

First if you are used htaccess url rules rewriting in php so .php not show

 

this code copy in htaccess file due to htaccess url rules rewriting in php

RewriteRule ^commentansfilename$ ./commentansfilename.php

 

Now set direct url and check like this

 

url:"http://www.localhost/domain/commentansfilename",

 

               $.ajax({

                type:"post",

                url:"http://www.localhost/domain/commentansfilename",

data:"coursename="+coursename+"&action=showcomment",

                   success:function(data){

                     $("#dismsgcomment").html(data);

                }

            });

 

 

 

How can I redirect and rewrite my URLs with an .htaccess file