Re: Please help with determining absolute paths using RewriteCond and RewriteRule

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-11-2004
Joshua Slive
 
Posts: n/a
Default Re: Please help with determining absolute paths using RewriteCond and RewriteRule

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.

  #2 (permalink)  
Old 08-11-2004
Jeffrey Silverman
 
Posts: n/a
Default Re: Please help with determining absolute paths using RewriteCond and RewriteRule

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)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0