Jump to content

How can I use differnet URL's in one page to locate a picture?


This topic is 8052 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a very simple databse setup for searching on designs I have.

Is it possible to return a different URL if the user is outside the building? My router won't allow me access to the public IP internally. If I set the IP in a field to the internal IP tp the server, no one outside the building can get the pictures, vice versa for the public IP.

As you can guess, I'm learning as I go...

[ March 28, 2002, 07:56 AM: Message edited by: Thread FX ]

Link to comment
Share on other sites

Internally I assume u'll use something like the 192.x.x.x IP address range which is reserved for LAN's.

If you use FMP-If to change the CDML based on if someone enters the site using 192.x.x.x (which is reserved for private LAN so will not be the IP of someone externally).

I think the tag is [FMP-ClientIP] but I may be wrong.

Also to make things easier you may want to grab this value using JavaScript and cut the first three numbers off ( 192 ) to make your If statements a lot simpler. You can do this with Lasso string tags but there isn't a CDML equivalent.

There may be a more simple solution but this is the first that came into my head

hope it helps

laugh.giflaugh.gif

Link to comment
Share on other sites

I use Tokens for this. I have a different first page for each access method which sets either the external or internal IP. By using [FMP-ClientIP] you could also set the appropriate value for the token.

The rest of the pages would look like this:

<form action="http://[FMP-CurrentToken]:1234/FMPro" .....

Hope this helps.

Garry

Link to comment
Share on other sites

Hi, I use this a lot to deliver different info to users inside and outside our building. In our case, though, all of our web servers have registered domain or sub-domain names, so IP address issues don't apply.

This example allows an internal user to link to record details, but not an external one:

[FMP-IF: ClientIP .cn. 192.42.175]

<A HREF="[FMP-LinkRecID: format=record_detail.htm, layout=Layout1]">[FMP-FIELD: requestnumber]</A>

[FMP-ELSE]

[FMP-FIELD: requestnumber]

[/FMP-IF]

...where '192.42.175' is the internal network

or you can use it to deliver two different pages:

[FMP-IF: ClientIP .cn. 192.42.175]

[FMP-INCLUDE:internal.txt]

[FMP-ELSE]

[FMP-INCLUDE:external.txt]

[/FMP-IF]

..........where the two '.txt' files contain the html/cdml for the different pages.

regards, jeff

Link to comment
Share on other sites

This topic is 8052 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.