how to set the redirect rules. to replace the static path ?
On May 7, 4:23 pm, Anand Chitipothu <[email protected]> wrote:
> 2009/5/7 magix <[email protected]>:
>
>
>
>
>
> > So that`s hard to choice another path for my image , css , js file .
> > right ?
>
> > class images:
> > def GET(self,name):
> > ext = name.split(".")[-1] # Gather extension
> > print '2222',name
> > cType = {
> > "png":"images/png",
> > "jpg":"image/jpeg",
> > "gif":"image/gif",
> > "ico":"image/x-icon" }
>
> > if name in os.listdir('images'): # Security
> > web.header("Content-Type", cType[ext]) # Set the Header
> > return open('images/%s'%name,"rb").read() # Notice 'rb'
> > for reading images
> > else:
> > web.notfound()
>
> > URL : http://webpy.org/images
>
> > Could we implement by this way ?
>
> No, it is typically done by writing webserver redirect rules.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---