I have a JS file that has a path to another script. If I do not want to reveal my directory structure, what would be the best way to obscure it?
For example, can I add a rewrite rule in .htaccess file and use that in my JS file or is there a better way to do that?
Current JS file:
URL_PATH = '/incl/pro/dir/files/server.php';
// change to:
URL_PATH = '/dir/server.php';
Create a .htaccess file in your DOCUMENT_ROOT location with following content:
Rewrite rule will take care of forwarding your request of
/dir/server.phpto/incl/pro/dir/files/server.phpinternally.