Error files & filepath...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error files & filepath...

Steve Upton

I suspect this is an Apache config issue (Apache 1.x & Lasso 8.5.5 on Mac OS 10.4)

But when our error page is processed response_filepath only returns "error.lasso" rather than the actual page that was requested.

Is there a way to retrieve that information? I want to process "virtual URLs"

Regards,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Error files & filepath...

Bil Corry-3
Steve Upton wrote on 10/30/2008 2:04 PM:
> I suspect this is an Apache config issue (Apache 1.x & Lasso 8.5.5 on Mac OS 10.4)
>
> But when our error page is processed response_filepath only returns "error.lasso" rather than the actual page that was requested.
>
> Is there a way to retrieve that information? I want to process "virtual URLs"

Did none of Steve's suggestions work out last time you asked?

http://www.listsearch.com/Lasso/Thread/index.lasso?20683#238619


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Error files & filepath...

Steve Upton
At 3:14 PM -0500 10/30/08, Bil Corry wrote:

>Steve Upton wrote on 10/30/2008 2:04 PM:
>> I suspect this is an Apache config issue (Apache 1.x & Lasso 8.5.5 on Mac OS 10.4)
>>
>> But when our error page is processed response_filepath only returns "error.lasso" rather than the actual page that was requested.
>>
>> Is there a way to retrieve that information? I want to process "virtual URLs"
>
>Did none of Steve's suggestions work out last time you asked?
>
>http://www.listsearch.com/Lasso/Thread/index.lasso?20683#238619

heh, thanks for the reminder. I thought I had stumbled down this path a while back.

Unfortunately, no. Though your reminder did prompt me to review the readings (especially Jason Huck's excellent article).

But no. I still find myself confused.

This page-error handling stuff I find to be very confusing and also doesn't seem to work quite as advertised. The suggestions by many to turn off extensionless handling by Lasso is an example.

To be honest, I'm not exactly sure how our site is set up right now, I just remember getting it to a point where I worked 'good enough' for what we needed and moving on.

The issue I have, I believe, is in Apache's handling of unknown files.

Here are four scenarios:

- user's URL references an existing directory but no file. Apache grabs default file so it's OK

- user's URL references an existing directory AND file WITHOUT extension. SOMETHING grabs the correct file so it displays OK. I think it's Lasso as I currently have URL rewrite enabled. (?)

- user's URL references a FILE that does NOT exist (this means the URL ends in a file extension) - presumably Apache redirects them to my error.lasso page but then I have the problem described above; I don't know what they were asking for in the first place.

- finally, user's URL refers to a directory which does not exist (no trailing extension, nor does it exist as a file as an above case). In this case I get the raw text contents of the error.lasso file without any Lasso processing. It's like it was filtered for Lasso code and then sent out as a .txt file as I can see the html code.

VERY strange, and plenty confusing... can anyone shed some light?


Regards,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: Error files & filepath...

Bil Corry-3
Steve Upton wrote on 10/31/2008 2:13 PM:
> > VERY strange, and plenty confusing... can anyone shed some light?

I haven't done it your way, so I can't tell you where something is going wrong.  If you want to skip using error.lasso, Lasso's URL rewrite engine, and whatever extensionless URL Apache directives you're using, you can try this instead.  Note that Apache 1.3 is the one version of Apache I no longer run, so I haven't tried this on Apache 1.3.  So remove all the Apache directives for extensionless URLs that you currently have and use the following:

<VirtualHost *:80>
    ServerName www.site.tld
    DocumentRoot /path/to/www.site.tld

    RewriteEngine On

    # Rules for Apache 1.3
    # Lasso gets all virtual files and directories
    RewriteCond %{REQUEST_URI}  !^.*\.LassoApp$  [NC]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d [OR]
    RewriteCond %{REQUEST_URI}  ^/$
    RewriteRule  (.*)  /processvirtualurl.lasso  [L,NS]
</VirtualHost>



If that shows the contents of processvirtualurl.lasso, then do this instead:

<VirtualHost *:80>
    ServerName www.site.tld
    DocumentRoot /path/to/www.site.tld

    RewriteEngine On

    # Rules for Apache 1.3
    # Lasso gets all virtual files and directories
    RewriteCond %{REQUEST_URI}  !^.*\.LassoApp$  [NC]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d [OR]
    RewriteCond %{REQUEST_URI}  ^/$
    RewriteRule  (.*)  /processvirtualurl.lasso  [L,NS]
    <Files processvirtualurl.lasso>
        SetHandler lasso8-handler
    </Files>
</VirtualHost>


Then create a file called "processvirtualurl.lasso" and know that any time it's called, the file is virtual.  You'll have to handle legitimate 404s that are not suppose to go to your URL handler.  If the file exists, then it should just load normally.



- Bil



--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/