Lloyd Zusman
2005-09-19 13:29:11 UTC
Forgive me if this question has been answered here before, but my
search in the list archives for "trailing" and "slash" yielded nothing.
If I have a webapp called "example" on my snakelets-powered site. This
site is a virtual host named "site.com". With this, I can access that
webapp
as follows:
http://site.com/example/
Note the trailing slash. If, on the other hand, I access the site as
follows,
I get error 404:
http://site.com/example
In other words, the trailing slash is necessary. However, I don't want
people who access the site to have to remember to code the trailing slash,
nor do I want them to access the site with an explicit "/index.y" in the
URL.
Is there any way to configure this webapp so that it functions the same
both with and without the trailing slash in the URL?
The way I set up the "example" webapp is as follows:
- I create an "example" subdirectory in my "webapps" directory.
- I put an "index.y" file into this "example" subdirectory. This file
contains the code for my webapp.
- I put an appropriate __init__.py file into the "example" subdirectory.
- I list "example" as one of the data values pointed to by the key
"site.com" in the "virtualhosts" map in the __init__.py file in the
"webapps" directory.
I'm hoping that I'm missing something in this setup that will cause the
trailing slash to no longer be mandatory.
Any ideas?
Thanks in advance.
--
Lloyd Zusman
ljz-CfBCfuhdJ+DQT0dZR+***@public.gmane.org
God bless you.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
search in the list archives for "trailing" and "slash" yielded nothing.
If I have a webapp called "example" on my snakelets-powered site. This
site is a virtual host named "site.com". With this, I can access that
webapp
as follows:
http://site.com/example/
Note the trailing slash. If, on the other hand, I access the site as
follows,
I get error 404:
http://site.com/example
In other words, the trailing slash is necessary. However, I don't want
people who access the site to have to remember to code the trailing slash,
nor do I want them to access the site with an explicit "/index.y" in the
URL.
Is there any way to configure this webapp so that it functions the same
both with and without the trailing slash in the URL?
The way I set up the "example" webapp is as follows:
- I create an "example" subdirectory in my "webapps" directory.
- I put an "index.y" file into this "example" subdirectory. This file
contains the code for my webapp.
- I put an appropriate __init__.py file into the "example" subdirectory.
- I list "example" as one of the data values pointed to by the key
"site.com" in the "virtualhosts" map in the __init__.py file in the
"webapps" directory.
I'm hoping that I'm missing something in this setup that will cause the
trailing slash to no longer be mandatory.
Any ideas?
Thanks in advance.
--
Lloyd Zusman
ljz-CfBCfuhdJ+DQT0dZR+***@public.gmane.org
God bless you.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php