jrp Posted April 19 Share Posted April 19 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 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted April 19 Share Posted April 19 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 Quote Link to comment Share on other sites More sharing options...
jrp Posted April 19 Author Share Posted April 19 Thank you irigsoft. I had been thinking about it too and did some experiments with UniApplication.Parameters But I wonder if it is possible to use different URL like http://somedomain.com and http://somedomain.com/wp-admin because it would look better for the end users. Quote Link to comment Share on other sites More sharing options...
jrp Posted April 22 Author Share Posted April 22 Is this possible? Quote Link to comment Share on other sites More sharing options...
jrp Posted April 25 Author Share Posted April 25 Hello, http://somedomain.com is for end users (no login required, and no login button displayed here) http://somedomain.com/admin is for administrators (login required) Anybody have done this before? Quote Link to comment Share on other sites More sharing options...
radekc Posted April 25 Share Posted April 25 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; 1 1 Quote Link to comment Share on other sites More sharing options...
jrp Posted April 26 Author Share Posted April 26 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.