Jump to content

UniGUI application with different URLs for end users and admin login


jrp

Recommended Posts

2 hours ago, jrp said:

Hello,

How to make UniGUI application with different URLs for end users and admin login?

Like when you use WordPress, for example: http://somedomain.com is for end users and http://somedomain.com/wp-admin is for admin login.

Do you have examples?

Thank you

Hi,

I use different parameters to load different forms.

like this: 127.0.0.1:8077/?form=Admin

Link to comment
Share on other sites

procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo;
  AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean);
begin
 if (ARequestInfo.CommandType = hcGET) and (ARequestInfo.URI = '/admin') then
 begin
   AResponseInfo.Redirect('/?form=Admin');
   Handled := True;
 end;
end;

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, radekc said:
procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo;
  AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean);
begin
 if (ARequestInfo.CommandType = hcGET) and (ARequestInfo.URI = '/admin') then
 begin
   AResponseInfo.Redirect('/?form=Admin');
   Handled := True;
 end;
end;

 

Thank you radekc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...