I have no doubt this will turn out to be dumb, but I'm not very experienced
with .htaccess files and I'm having a struggle.
I've got a pretty straight forward web.py application I'm building. It
works fine running the local webserver. However, when I put it on
Dreamhost, I can't access my static files.
Per the Dreamhost instructions, the .htaccess file is:
[cummiskey]$ cat .htaccess
Options +ExecCGI
AddHandler cgi-script .py
DirectoryIndex index.py/
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /public/
RewriteCond %{REQUEST_URI} !^/favicon.ico$
RewriteCond %{REQUEST_URI} !^/static/(.*)$
RewriteCond %{REQUEST_URI} !^(/.*)+index.py/
RewriteRule ^(.*)$ /index.py/$1 [PT]
</IfModule>
When I access the page, the access.log shows
67.165.250.93 - - [12/Sep/2011:19:40:38 -0700] "GET /index.py/ HTTP/1.1" 200
678 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2)
Gecko/20100101 Firefox/6.0.2"
67.165.250.93 - - [12/Sep/2011:19:40:39 -0700] "GET
/index.py/static/reset.css HTTP/1.1" 404 255
"http://www.microscopy.salveteomnis.com/index.py/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.7; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
67.165.250.93 - - [12/Sep/2011:19:40:40 -0700] "GET
/index.py/static/common.css HTTP/1.1" 404 256
"http://www.microscopy.salveteomnis.com/index.py/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.7; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
67.165.250.93 - - [12/Sep/2011:19:40:40 -0700] "GET
/index.py/static/microscope-large.jpg HTTP/1.1" 404 256
"http://www.microscopy.salveteomnis.com/index.py/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10.7; rv:6.0.2) Gecko/20100101 Firefox/6.0.2"
Clearly (?) the URI isn't being rewritten correctly, but I've been messing
with the .htaccess for a while with no luck.
Could some kind soul give me a hint?
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/webpy/-/p2DK0y5NVRgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.