Fred
October 3, 2021, 9:19am
1
Hello There,
I have hundreds of apps that occasionally connect to a WebDirect solution and where the URL is hardcoded using the old WD URL syntax of FMS 15 :
http://192.168.123.101/fmi/webd?homeurl=http://192.168.123.101/xyz_home.html #Contacts
That worked until at least FMS 16 but now i updated to 19, the syntax should be :
http://192.168.123.101/fmi/webd /Contacts ?homeurl=http://192.168.123.101/ xyz_home.html
Obviously i am figuring out how can i avoid to modify hundreds of files and configure the apache instance of FMS 19 to redirect theses old URL’s.
What is sad is i had the similar problem years ago with IWP and i had no luck. The track was the RewriteCond instruction.
I first tried to alter the httpd-rewrite.conf file located in : /Library/FileMaker Server/HTTPServer/conf/extras/
But even after restart of HTTPserver it sounds like my rules were ignored.
I suspected a fault in my syntax since i am not familiar with Apache nor REGEX , and tried very simple rules like :
RewriteRule ^/aloha /fmi/webd
I then excepted that
http://192.168.123.101/aloha
will lead to :
http://192.168.123.101/fmi/webd
But nope…
Any tracks ?
Thanks !
Fred
1 Like
Fred
October 4, 2021, 7:18am
3
Thanks for the insight !
Yes you are right and i was able to manage my sample case "aloha" with the redirect command from alias module.
However, i think that converting my v15 WebDirect URL is finally impossible because FMI initially used an anchor to refer to databases ex : "http://192.168.123.101/fmi/webd#Contacts " and this # is not handled by the server.
But i would be very happy to be wrong… so pleeeaaaase don’t hesitate to tell me so
Apache will allow you to access the query string but I don't have the answer. You might find knowledgeable advice on StackOverflow.
Fred
October 6, 2021, 7:32pm
5
Thanks. Without any conviction i will give it a try...
Fred
October 6, 2021, 9:42pm
6
1 Like
Fred
October 10, 2021, 4:03pm
7
Still struggling. Problem with # confirmed. It seem always ignored.
However, i am progressing.
I added this rule on "httpd-rewrite.conf" :
RewriteCond %{THE_REQUEST} xyz_home.html
RewriteRule ^/fmi/webd https://%{SERVER_NAME}/fmi/webd/Contacts
It works fine the first time after i cleared the cache of the browser and if the url is not secured (begin with http://).
as for instance :
http://192.168.123.101/fmi/webd?homeurl=http://192.168.123.101/xyz_home.html #Contacts
Then, all other similar tries fail, apparently because the browser automatically convert to https :
https ://192.168.123.101/fmi/webd?homeurl=http://192.168.123.101/xyz_home.html
Here, the rule is failing and the url is not rewritten.
The point now seems to be http or https.
Is there another conf file for https ?
Or another rule to override ?
Any thoughts ?