Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Please help with determining absolute paths using RewriteC..

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Directory index forbidden by rule:/var/www/html/  
Author Message
jeffrey2

External


Since: Aug 10, 2004
Posts: 6



(Msg. 1) Posted: Tue Aug 10, 2004 6:30 pm
Post subject: Please help with determining absolute paths using RewriteCond and RewriteRule
Archived from groups: alt>apache>configuration, others (more info?)

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 don't want to use %{DOCUMENT_ROOT}%{REQUEST_URI} or type in the start of
the path a la /home/webmaster/public_html%{REQUEST_URI} because sometimes
the start of the path is not DOCUMENT_ROOT or the hard-coded stuff before
REQUEST_URI. As in the case of a user's home directory accessed in the
tilde-username style - e.g. http://myserver/~jeff/test.php .

How can mod_rewrite get the full path from, say, the last URL example --
http://myserver/~jeff/test.php ??

I hope I have made this clear. Please let me know how I can further
clarify.

Thanks in advance!

--
Jeffrey D. Silverman | jeffreyPANTS DeleteThis @jhu.edu **
Website | http://www.newtnotes.com

(** Drop "pants" to reply by email)

 >> Stay informed about: Please help with determining absolute paths using RewriteC.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Proxy && Absolute URIs - Is it possible to interpret URIs as the come from the 'ProxyPass'ed server? The application in question creates absolute URIs of it's content (all of which are dynamically generated and currently don't offer any configuration.)

VirtualHosts and Absolute addressing in HTML - Hi, I'm up to my knees in crocodiles on this, and rapidly forgetting that my original intention was to drain the swamp. I'm using Apache 1.3.27 (installed using PHPDev 4) to maintain a number of Web sites. I use my local PC for development only (not as...

Apache to serve files given by absolute filename - Hello Brief description: I want Apache not to prepend the server name to file names that are activated by clicking on the html anchor in a document. Detailed description: I have a document that contains anchors with HREF attribute pointing to a file...

Trying to alias directory paths? - I'm in the process of switching from a shared FreeBSD server to a dedicated RedHat server running Plesk v7.02 control panel. I have many PHP and perl scripts that use the server path to files and directories. Since the paths differ between servers I woul...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]