How to convert on the fly old WebDirect 15 URL’s to actual URL

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

You may be able to use mod_alias. It’s simpler.

https://httpd.apache.org/docs/2.4/mod/mod_alias.html

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 :blush: :pray:

Apache will allow you to access the query string but I don't have the answer. You might find knowledgeable advice on StackOverflow.

Thanks. Without any conviction i will give it a try...

Tried !
https://stackoverflow.com/questions/69472964/apache-redirect-when-original-url-contain-a-hashtag

1 Like

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 ?