So, the install does something like this:
http*//www.site-name-here.com/cgi-which/software/prog?a=111&b=111&c=111
I'd like to get this to display like this:
http*//www.site-name-here.com/random-folder/generic/abcd/a/111/b/111/c/111
I know that for the ? & and =, you can do a regex in the .htaccess file, which I've got ready. But for the folder name change, is this possible? How do I got about it? Any readings you can point me to here or at apache.org or???
Thing is I don't think I can actually go through all of the software and then change the default folder it gets installed into, so I believe a rewrite of some kind is the only option.
Basically, getting the server to serve content from http*//www.site-name-here.com/cgi-which/software/prog?a=111&b=111&c=111
for requests for http*//www.site-name-here.com/random-folder/generic/abcd/a/111/b/111/c/111
is done and fairly straight forward.
What the problem is now is that the application still generates urls for display as http*//www.site-name-here.com/cgi-which/software/prog?a=111&b=111&c=111 ?
If this is the case - I would try the following, (never done it but should work in theory)
Write a cgi script that basically acts as an agent between your generic software and mod_rewrite. You'd set mod_rewrite to send requests to your script. Your script would then pick up the content from the generic software using LWP, read the html and run a regex on the "a href"'s to switch to your new url's. The munged content would then be returned to the user.
Cookies and javascript would also need to be munged - and maybe a lot more difficult.
Hope you like the idea - if you try let me know if it works.