Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.04; 'paths': 0.05; 'python': 0.09; 'subject:method': 0.09; 'static': 0.13; 'apache': 0.13; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'mapped': 0.16; 'wrote:': 0.17; 'config': 0.17; 'subject:page': 0.17; 'appropriate': 0.20; 'trying': 0.21; 'do.': 0.21; 'fairly': 0.21; 'either.': 0.22; "i've": 0.23; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'rules': 0.27; 'trouble': 0.28; 'switch': 0.32; 'subject: .': 0.33; 'to:addr:python-list': 0.33; 'received:org': 0.36; 'message- id:@gmail.com': 0.36; 'uses': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'map': 0.61; 'hard.': 0.84; 'subject:Using': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Tue, 22 Jan 2013 11:21:23 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121115 Thunderbird/10.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Using filepath method to identify an .html page References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358878899 news.xs4all.nl 6881 [2001:888:2000:d::a6]:58468 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37321 On 01/22/2013 03:07 AM, Ferrous Cranus wrote: > Now, can you pleas help me write the switch to filepath identifier? > I'am having trouble writing it. Unfortunately this isn't the way to go either. Apache uses its own config and rules to map a url to a "filepath." There's no way for Python to do this without interrogating Apache. And it's not necessary anyway. Urls to paths are mapped in a fairly static way by Apache. Just put your files in the right folders and generate the appropriate urls. It's not hard. You're struggling because you either don't understand how apache works, or you're trying to work against it. I've been deploying web sites for years and I've never had to do any of the things you are trying to make Python do.