I want to run a Ajax call, but I am having issue locating the script.php file because of my htaccess rewrite rules. I have a index.php, script.php and .htaccess in the same folder. In the htaccess, there is a RewriteRule which formats a URL like this "domain.com/index.php?bla=123" into this "domain.com/123".
However, my javascript cannot locate the PHP-Script since the path is set to "script.php" when the URL becomes "domain.com/asdf/". Any idea how to run the script from the js whether through the root or a FAKE directory.
url: "script.php" || "../script.php",