ReWrite Rule and css files - what am I doing wrong?

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

ReWrite Rule and css files - what am I doing wrong?

Brad Fuller
Probably something stupid...

I'm using Pier and Seaside without alteration straight from SqueakMap. I
have not created a separate css.

When I access the site like this:

http://www.my_domain.org:9999/seaside/pier

Everything is fine - that is I see the standard css formating of Pier.

But when accessing like this:

http://www.my_domain.org/

The content, et.al. is the fine except there is no css formating of the
page.

First I thought it was something to do with the rewrite rules:

<VirtualHost *:80>
   ServerName www.my_domain.org
   DocumentRoot /var/www/html/my_domain
      <Directory /var/www/html/my_domain>
               Order deny,allow
               Allow from all
      </Directory>
   ErrorLog /var/www/html/my_domain/logs/www.my_domain.org-error_log
   CustomLog /var/www/html/mmiki/logs/www.my_domain.org-access_log common

     ProxyPreserveHost On

     RewriteEngine ON
     RewriteCond /var/www/html/my_domain/%{REQUEST_FILENAME} !-f
     RewriteRule ^/(.*)$ http://localhost:9999/seaside/my_domain/$1 [P,L]


But, when looking at the apache access log there is:

GET /seaside/files/PRPierLibrary/style.css HTTP/1.1" 404 83

In the configuration page, PRPierLibary is in the File Library under
Pier.  But I don't know why there is css formating in the direct way
(http://www.my_domain.org:9999/seaside/pier), and apache is looking for
a css file in the second (http://www.my_domain.org/).

Makes no sense to me.

BTW: I did create a sub-directory called: files/PRPierLibrary with the
default style.css from Lukas under the directory where the image is
located, but that didn't do anything.
(I stopped and restarted WAKom just in case.)

I'd, of course, be most grateful for any hints. Thanks much!

brad

--
brad fuller
  http://www.Sonaural.com/
  +1 (408) 799-6124


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: ReWrite Rule and css files - what am I doing wrong?

Lukas Renggli
> But, when looking at the apache access log there is:
>
> GET /seaside/files/PRPierLibrary/style.css HTTP/1.1" 404 83
>
> In the configuration page, PRPierLibary is in the File Library under
> Pier.  But I don't know why there is css formating in the direct way
> (http://www.my_domain.org:9999/seaside/pier), and apache is looking for
> a css file in the second (http://www.my_domain.org/).

That's the new way for Seaside to serve static files.

> BTW: I did create a sub-directory called: files/PRPierLibrary with the
> default style.css from Lukas under the directory where the image is
> located, but that didn't do anything.
> (I stopped and restarted WAKom just in case.)

You either need to create a directory seaside/files/PRPierLibrary/
with your files or add the following rewrite rule right after enabling
the rewrite engine:

RewriteRule ^/seaside/files/PRPierLibrary/(*.)$
http://www.my_domain.org:9999//seaside/files/PRPierLibrary/$1 [P,L]

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: ReWrite Rule and css files - what am I doing wrong?

Brad Fuller
Lukas Renggli wrote:

>> But, when looking at the apache access log there is:
>>
>> GET /seaside/files/PRPierLibrary/style.css HTTP/1.1" 404 83
>>
>> In the configuration page, PRPierLibary is in the File Library under
>> Pier.  But I don't know why there is css formating in the direct way
>> (http://www.my_domain.org:9999/seaside/pier), and apache is looking for
>> a css file in the second (http://www.my_domain.org/).
>
> That's the new way for Seaside to serve static files.

Ok, but why am I getting css formating correctly w/o using apache? There
were no css files for seaside to access.

>
>> BTW: I did create a sub-directory called: files/PRPierLibrary with the
>> default style.css from Lukas under the directory where the image is
>> located, but that didn't do anything.
>> (I stopped and restarted WAKom just in case.)
>
> You either need to create a directory seaside/files/PRPierLibrary/
> with your files

note to others:

the directory that houses your css files:

seaside/files/PRPierLibrary/

must be a subdir under your document root for apache to access it.

>or add the following rewrite rule right after enabling
> the rewrite engine:
>
> RewriteRule ^/seaside/files/PRPierLibrary/(*.)$
> http://www.my_domain.org:9999//seaside/files/PRPierLibrary/$1 [P,L]
>
> Cheers,
> Lukas
>


--
brad fuller
  http://www.Sonaural.com/
  +1 (408) 799-6124


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: ReWrite Rule and css files - what am I doing wrong?

Lukas Renggli
> the directory that houses your css files:
>
> seaside/files/PRPierLibrary/
>
> must be a subdir under your document root for apache to access it.

This is the new way Seaside serves static files. Have a look at the
dispatcher configuration, there you can customize the files being
served by Seaside.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside