[Xitami] Dynamic URL converstion to static URLs
R O
rolinger1 at hotmail.com
Tue Jan 8 23:29:19 CET 2008
hhhmmm...heres a thought.
Currently I have a filter processing .pl files with perl anywhere in my webpages (htdocs) directory. Executing them just as they would be executed in the cgi-bin directory. Create another filter for "*.ptml" files to be executed by perl. Creating the static urls from dynamic content is easy...however its the conversion back during request processing that has to happen within the script that was executed.
Dynamic URL: /cgi-bin/foo.pl?var1=10&var2=30&var3=30
would be translated to the static URL in a page, this can be easily done in the script that is would have normallhy generated the dynamic URL:
/cgi/var1_10/var2_20/var3_30/foo.phtml
or
/cgi/10/20/30/foo.phtml
A filter/alias would have to execute the *.phtml files from a base directory...cause the above static urls would break with a 404 because the actual path /cgi/10/20/30 (or whatever) doesn't actually exist. Then foo.phtml, processed as a perl script, would take the $QUERY_STRING and parse it on the "/" thus returning the first few variables.
I think the key here is getting xitami to see the *.ptml file extension first and look for that file in a specific directory and execute it before xitami tried to look for the file in the full path/url that doesn't actually exist. This still might actually work using the cgi-bin directory....b/c Xitami has an option for the cgi files - execute with /cgi-bin as the root of the path or execute when /cgi-bin is anywhere in the path...though it typically still looks for an exact path doesn't it?
Thoughts?Russel P. Olinger rolinger1 at hotmail.com> Date: Tue, 8 Jan 2008 21:32:26 +0100> From: mw at 9000.org> To: xitami at lists.xitami.org> Subject: Re: [Xitami] Dynamic URL converstion to static URLs> > R O wrote, On 2008-01-08 21:14:> > I am getting into some rather new territory here. My site is just about > > 100% dynamic and I am beginning the process of converting long, hard to > > read dynamic URLs to static URLs. Static URLs, I am learning, are much > > friendlier to search engines and crawlers.> > > > That being said, everything I see regarding the subject uses Apache > > based modules....has anyone here done any dyanmic URL conversions with > > perl on Xitami?> > I don't think that's possible. You can make heavy use of aliasing, of > course, to get somewhat prettier URLs but the apache (et al) stuff is > being done with mod_rewrite (or equiv), and that isn't possible with > Xitami AFAIK. One option would be to just use the 404 page for > everything (don't laugh!), handling your own internal redirects, but if > I am not mistaken Xitami doesn't allow scripting in error pages (my > memory is a little sketchy here but I'm pretty sure I have tried such > things).> > -- > Magnus Wedberg> http://www.magnuswedberg.com/> mw AT 9000.org> Warning! Objects in viewfinder may be closer than they appear.> > > --> Xitami Users Mailing List -- For Xitami support> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xitami.org/pipermail/xitami/attachments/20080108/2f5e028b/attachment.htm
More information about the Xitami
mailing list