You are using apache, right?

>From webpy site,

mod_rewrite Rules for Apache

If you want web.py to be accessible at 'http://example.com' instead of
'http://example.com/code.py/' add the following rules to the .htaccess
file:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_URI} !^/icons
  RewriteCond %{REQUEST_URI} !^/favicon.ico$
  RewriteCond %{REQUEST_URI} !^(/.*)+code.py/
  RewriteRule ^(.*)$ code.py/$1 [PT]
</IfModule>

If the code.py is in the subfolder myapp/, adjust the RewriteBase to
RewriteBase /myapp/. If you have static files like CSS files and
images to pass through, duplicate the line with the icons for each
path you want to allow.

Did you ever try this?

Z

On Tue, Sep 14, 2010 at 5:45 AM, Monty808 <[email protected]> wrote:
> I added a ../static rather than static to my files and that worked.  I
> just cant get rid of the www.xxx.com/index.py/demo.  I can rewrite to
> www.xxx.com/demo
>
> WHen I go to my url www/xxx.com  there is no indexy.py so it works
> there.  Should not the example code take care of that from the online
> docs?
>
> On Sep 14, 5:39 pm, Monty808 <[email protected]> wrote:
>> Well...I created the .htaccess file per the online docs.  Not
>> working.  Alos have js files under the static/javascript directory.
>> To no avail.  I am using webfaction and is very robust.
>>
>> Does any once have an .htaccess file that works on webfaction?
>>
>> On Sep 14, 10:05 am, Zerony Zhao <[email protected]> wrote:
>>
>> > You can check this:
>>
>> >http://webpy.org/install
>>
>> >http://webpy.org/cookbook(Deployment:)
>>
>> > To get rid of index.py, for example, see mod_rewrite Rules for Apache.
>>
>> > About js file can not be found, you can inspect the rendered page
>> > source, to check path of the js file, and adjust it properly.
>>
>> > A naive thought from webpy beginner.
>>
>> > Z
>>
>> > On Mon, Sep 13, 2010 at 8:16 PM, Monty808 <[email protected]> 
>> > wrote:
>> > > Hi,
>>
>> > > Is this the right place this questions?  I can get web.py to work
>> > > because the java script files can not be found.  Is this a webpy
>> > > issue?
>>
>> > > On Sep 13, 2:49 pm, Monty808 <[email protected]> wrote:
>> > >> Everything works using the builtin webserver.
>>
>> > >> When I upload to webfaction, things break.
>>
>> > >> My domain comes up fine e.g.www.xxx.com.  When I click a link I 
>> > >> seewww.xxx.com/index.py/demo.  How do I get rid of that index.py?
>> > >> Also...my js files cant be found.  There are in static/javascript/.../
>>
>> > >> Below is my .htaccess files.
>>
>> > >>  <IfModule mod_rewrite.c>
>> > >>       RewriteEngine on
>> > >>       RewriteBase /
>> > >>       RewriteCond %{REQUEST_URI} !^/static
>> > >>       RewriteCond %{REQUEST_URI} !^/icons
>> > >>       RewriteCond %{REQUEST_URI} !^/favicon.ico$
>> > >>       RewriteCond %{REQUEST_URI} !^(/.*)+index.py/
>> > >>       RewriteRule ^(.*)$ index.py/$1 [PT]
>> > >>     </IfModule>
>>
>> > >> Thanks
>>
>> > > --
>> > > You received this message because you are subscribed to the Google 
>> > > Groups "web.py" group.
>> > > 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 
>> > > athttp://groups.google.com/group/webpy?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
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.

Reply via email to