Update Htaccess -- 2

Job ID: 36923456

Budget: $10 – $30 USD

Don't Bid Higher Then $10

You can test your solutions by creating respective folder patterns! I have also uploaded a demo folder pattern with present htaccess file.

Existing htaccess which using now.
###################

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Uncomment below line for login page redirection, if you don't want to use a landing page.
#RewriteRule ^$ /members/index.php [L,R=301]


NEW CHANGES REQUIRED BY YOU!
########################
Including above htaccess, required below updates
/sub-folder/all-other-php-urls.php CHANGE TO /sub-folder/all-other-php-urls


MAKE SURE RESOURCES CALLED ON PHP FILE / AJAX DON'T CAUSE ANY ISSUE ON SCRIPT.
EG: AJAX REQUEST SENT /functions/a-file-to-submit-database-update.php


Need to remove [functions]
/functions/api/validation?query-strings CHANGE TO /api/validation?query-strings
/functions/api/results?query-strings CHANGE TO /api/validation?query-strings
/functions/api/external_verify?query-strings CHANGE TO /api/external_verify?query-strings


functions here is a folder
api here is a folder
validation, results & external_verify are php file validation.php, external_verify.php & results.php


PROVIDE ME CORRECT REGX SOLUTIONS, SO I CAN TEST AT MY END. SOLUTIONS MUST WORK IN apache, apache + nginx proxy. Apache Modrewrite module active.
Related categories: PHP JavaScript AJAX Software Architecture MySQL