...
An example mod_expires configuration might look like:
Code Block | ||||
---|---|---|---|---|
| ||||
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A60
ExpiresByType image/bmp A3600
ExpiresByType image/gif A3600
ExpiresByType image/ief A3600
ExpiresByType image/jpeg A3600
ExpiresByType image/png A3600
</IfModule>
|
You will also need the corresponding type-extension mappings:
Code Block | ||||
---|---|---|---|---|
| ||||
<IfModule mod_mime.c>
AddType image/bmp bmp
AddType image/gif gif
AddType image/ief ief
AddType image/jpeg jpeg
AddType image/jpeg jpg
AddType image/jpeg jpe
...
</IfModule>
|
...
Aaron Rosenzweig has a very thorough article about using mod_rewrite with Apache.
mod_rewrite with mod_webobjects
...
So in http.conf, search for mod_rewrite and change it to:
No Format |
---|
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache/mod_WebObjects.so
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
|
, find again:
No Format |
---|
AddModule mod_WebObjects.c
AddModule mod_rewrite.c
|
...
Here's an example mod_rewrite we use on one of our apps:
Code Block | ||||
---|---|---|---|---|
| ||||
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/$ /page/HomePage [R]
RewriteCond %{QUERY_STRING} ^appNum=([-0-9]+)(.*)$
RewriteRule ^/page/(.*)$ /cgi-bin/WebObjects/AppName.woa/%1/wa/viewPage?pageName=$1%2 [L,PT]
RewriteRule ^/page/(.*)$ /cgi-bin/WebObjects/AppName.woa/wa/viewPage?pageName=$1 [L,PT,QSA]
</IfModule>
|
...
The new default configuration is:
Code Block | ||||
---|---|---|---|---|
| ||||
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
|
...
Info | ||
---|---|---|
| ||
The default
This prevents |
...
Enjoy your shiny new WO adaptor.
Note: if you are getting the error
No Format libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' apxs:Error: Command failed with rc=65536
...