Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

fpWeb and dynamic path_info

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

I'm trying to learn how to use fpWeb, and I wish to implement (for the learning) my web site (http://www.linesip.com). If you follow the links, you will find links such as:
/he/servcies/smartpbx etc...

The "he" part is actually dynamic and can be set to other languages (in the feature) and it exists for mostly search engines.
How can I create such dynamic path_info using fpWeb ?

Thanks,
Ido

LINESIP websites:
http://www.linesip.com
http://www.linesip.co.il
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101106/1c109805/attachment.html>

Reply by email

Michael Van Canneyt
to ik
ik wrote 8 lines
Hello, I'm trying to learn how to use fpWeb, and I wish to implement (for the learning) my web site (http://www.linesip.com). If you follow the links, you will find links such as: /he/servcies/smartpbx etc... The "he" part is actually dynamic and can be set to other languages (in the feature) and it exists for mostly search engines. How can I create such dynamic path_info using fpWeb ?

It is actually inverse to how fpweb works. The first 2 elements of the path determine the functionality, I would expect the last part to determine the language.

The best way to deal with this is probably to use the OnGetModule event of TCustomWebApplication and examine and possibly 'cut' the first part off (use getnextpathinfo to cut it off), and save it in some temporary request variable (you can append it to TRequest).

If the OnGetModule returns Nil, normal fpwebprocessing will occur to determine the actual module that must be invoked.

Michael.

Reply by email