On Apr 25, 2010, at 8:51 AM, Vasile Ermicioi wrote: > worked, thank you! > > need something like this > > routes_in = ( > ('(.*):https?://(.*)site1\.com:(.*)/(.*)', '/site1/$4), > ('(.*):https?://(.*)site2\.com:(.*)/(.*)', '/site2/$4'), > )
At the very least, you might want something like this: routes_in = ( ('(.*):https?://(.*)site1\.com:(.*?)/(.*)', '/site1/$4'), ('(.*):https?://(.*)site2\.com:(.*?)/(.*)', '/site2/$4'), ) ...and you can use Massimo's nifty $anything pattern as well. Otherwise you'll translate something like this: http://site1.com/a/c/f/a1/a2 into /site1/a2 Have you tested your pattern with 'site1.com'? (That is, with no trailing slash?) -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en