This is a discussion on Re: Please help with determining absolute paths using RewriteCond and RewriteRule within the Linux Web Servers forums, part of the Web Server and Related Forums category; Jeffrey Silverman wrote: > Hi, all! I am tearing my hair out here... > > I want to rewrite some ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Jeffrey Silverman wrote:
> Hi, all! I am tearing my hair out here... > > I want to rewrite some URLs based on the absolute path and whether the > resulting thing being looked for is actually a real file or directory or > not. The Apache mod_rewrite documentation is pretty good and so is the > companion rewriting guide, but they are lacking some details that I need > to understand. > > Question: It seems to me that REQUEST_URI, REQUEST_FILENAME, and > SCRIPT_FILENAME all contain the exact same information. Unfortunately, > none of these contain the absolute path to the resource. What CGI variable > accessible to mod_rewrite can be used for this? I need the FULL path that > mod_rewrite thinks leads to the resulting resource. I haven't looked at this in detail, but it is my understanding that mod_rewrite can't provide this, because it doesn't know all the processing that apache is going to do on the url. But you can use the -F or -U checks to have mod_rewrite run through all the apache processing. Joshua. |
|
|||
|
On Wed, 11 Aug 2004 08:30:10 -0700, Joshua Slive wrote:
> I haven't looked at this in detail, but it is my understanding that > mod_rewrite can't provide this, because it doesn't know all the processing > that apache is going to do on the url. But you can use the -F or -U > checks to have mod_rewrite run through all the apache processing. > > Joshua. Thanks for the reply. What do the -F and -U flags do for RewriteCond? I read (and re-read) the documentation but I am a smidge unclear on it. To quote: (from <http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond>): """" '-F' (is existing file via subrequest) Checks if TestString is a valid file and accessible via all the server's currently-configured access controls for that path. """" So, the string is checked against the apache configuration to see if it comes up with a valid file? Even my explanation doesn't make sense to me. Any clarification would be good; in the meantime, I will muck with it to see if I can get it to work. Later... -- Jeffrey D. Silverman | jeffreyPANTS@jhu.edu ** Website | http://www.newtnotes.com (** Drop "PANTS" to reply by email) |