-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: how to make index.html the default in all directories? #3
Comments
I don't have answer for this, because I don't remember it. I've used google's code which existed in their app engine SDK at some point. I did quick scan of this document: According to that document regexps should work and I don't see any mistake in your site.yaml. Maybe they updated their code and this document... or there is some bug on my side :-/ |
And yes, this is the best place for asking questions. I don't have time to open and maintain separate support forum for drydrop. |
Thanks for all the support! |
I'm toying a bit with the code, trying to make it an option for drydrop to automatically search for index.html in directories instead of trying to fetch the directory itself. My current algorithm is this: if query returns with 404 and the requested filename does not have an extension (to avoid trying this on every single file not found), then append "/index.html" and try again. This seems to work fine for most cases, but I think it would be best to just test if the requested file is a directory, and then append /index.html to it from the start. However, not being very familiar with GAE, I don't know if this is possible. Thanks for any ideas! I will push a patch to my branch when I'm happier with the code, in case you want to take a look at it. |
if you fork I'll look at it for sure. your approach is more like a hack, so I cannot promise I'll include it into official drydrop. in drydrop I'd like to see working those regexps from appconfig.html docs. |
I actually think using regexes to identify directories is more of a hack, because there is no way to reliably do it (unless you assume a slash is ALWAYS included at the end of a directory request, but this is not the case). If there is a way to detect if a requested resource is a directory, and only then append /index.html to it, then it would be the same mechanism that a regular web server uses. I haven't had a chance to look more at the code, but I'll do in the next few days and send you a patch. |
You can use github api to see what is a directory, e.g, |
Hi,
Is there a forum of some other place to ask questions like this?
First of all, drydrop is very very useful! I'm using it to migrate my static web sites to GAE and get rid of a rented dedicated server.
Second, I know this is more of a GAE question, but I thought you may have encountered it - how to make index.html the default file for all directories? I tried the following:
But this resulted in a syntax error. I would like if possible to avoid having to add handlers for all my directories.
Thanks a lot.
The text was updated successfully, but these errors were encountered: