You are not logged in.
Pages: 1
Hi,
how to simply change the /blog path to a root / ?
should be set with these ?
aHTTPServer.RootRedirectToURI
aServer.RootRedirectGet
no success in replace string /blog /blog/default with /
thanks!!
Offline
Those methods do HTTP redirection, not HTTP path substitution.
So you could redirect / to /blog/default via aHTTPServer.RootRedirectToURI and /blog to /blog/Default via aServer.RootRedirectGet.
Path substitution only works with host virtual names by now, via DomainHostRedirect.
So you can redirect the blog.project2.com domain to root/blog/* URI for instance, but not redirect the /* sub URI to /blog/*.
Offline
thanks for details explained !
I do some tests now.
so basically /blog/default could not became /blog ? is an attempt to short url lenght and get is clean
my attempt is also increase the structure add more tables and to something like this:
/blog1
/blog2
or
/articles
/news
/video
and so on, or
article.domain.com
video.domain.com
news.domain.com
where any site area is an independent blog where spidered links and extract wil be added with user posting featuers, like demo already have
Offline
article.domain.com
video.domain.com
news.domain.com
URI rewriting are handled by TSQLHttpServer.DomainHostRedirect
Other direct URI rewriting are not handled yet.
We may add it, but in real hosting on the web, TSQLHttpServer.DomainHostRedirect should be enough.
You would probably never access your http server from localhost, and if you do, you won't mind having verbose URI.
From the outside, you will use domain hosts, so TSQLHttpServer.DomainHostRedirect should be sufficient.
The fact that you can access the server from localhost is a detail.
Even with apache or nginx, the localhost URI do not match the domain host URIs.
And it is not an issue, IMHO.
Offline
Hi, I am newbie to framework and i run the sample MVCServer. Just wondering how can i change the line of code where a TSQLRestServerDB is created
"aServer := TSQLRestServerDB.Create(aModel,ChangeFileExt(ExeVersion.ProgramFileName,'.db'));" instead of pointing to a SQL3 db to point to an MSSQL db.
Offline
You should use an external database.
See http://synopse.info/files/html/Synopse% … l#TITL_146
This is what the https://github.com/synopse/mORMot/blob/ … greSQL.dpr sample does, for PostgreSQL.
Change the DB provider to point to MSSQL instead.
For MSSQL access, our SynOleDB.pas provider may be preferred.
Offline
Thank you, I follow the MVCPostgress sample technique modifying for MSSQL and project run with success.
Is this the proper technique to follow in order to be indepented of all DB vendors by including all vendors in complie and choose one each time project runs in runtime?.
Offline
I think that this could be done using ZEOS:
Zeos7.2-beta branches_ testing_Revision 3628:
http://svn.code.sf.net/p/zeoslib/code-0 … sting-7.2/
(Firebird/InterBase, MariaDB/MySQL, PostgreSQL, SQLite, Oracle, Sybase, MSSQL, ADO(Windows); Lazarus, Delphi, CodeTyphon; 32/64-bit).
Zeos7.3-beta branches_ testing_Revision 3632(test version):
http://svn.code.sf.net/p/zeoslib/code-0 … sting-7.3/
(Firebird/InterBase, MariaDB/MySQL, PostgreSQL, SQLite, Oracle, Sybase, MSSQL, ADO(Windows), OLE DB-MSSQL(Windows); Lazarus, Delphi, CodeTyphon; 32/64-bit).
http://zeoslib.sourceforge.net/viewtopi … &start=338
Arnaud, could you try to create such Universal MVC-Server Demo?
Michal
Offline
@ab,
Similarly to SynDBExplorer with ConnectionStrings manager(it may be in the ini file).
Compiling with the entire ZEOS will increase MVC-Server 2-3MB.
Michal
Offline
Pages: 1