Re: Curious inability to mod_rewrite absolute paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Happy New Year, all!

Perhaps phrasing my question using this demonstration will make my problem 
clearer:

I set up a dummy website on my server under a "dummy" folder. Therefore, from 
Firefox, to the dummy, I go to "http://localhost/dummy/";. dummy/index.html 
says:

# Begin index.html
<!DOCTYPE html>

<html>
<head>
  <title>Dummy</title>
  <meta charset="utf-8"/>
</head>
<body>
  <p>
    <img src="http://localhost/dummy/images/bowler.jpeg"; 
alt="http://localhost/dummy/images/bowler.jpeg"; /><br />
    <img src="images/bowler.jpeg" alt="images/bowler.jpeg" /><br />
    <img src="/images/bowler.jpeg" alt="/images/bowler.jpeg" /><br />
  </p>
</body>
</html>
# End index.html

dummy/images/bowler.jpeg exists and is a picture of my favourite hat.

I also have dummy/.htaccess :

# Begin .htaccess
Options FollowSymLinks

RewriteEngine On
RewriteRule /images/bowler.jpeg images/bowler.jpeg
# Begin .htaccess

So, I point Firefox to http://localhost/dummy/ and I get a page with two 
bowlers followed by the text "/images/bowler.jpeg". I cranked LogLevel to 
trace8 and put its output here: http://pastebin.com/ZnFBvzrA .

I notice in the log that httpd passes the requests for the first two images 
through RewriteRule in the .htaccess file. However, the call to fetch 
/images/bowler.jpeg *doesn't* go through the RewriteRule, but instead (line 50 
in the log) goes straight through protocol.c and, predictably, fails. This 
raises three questions:

1) Why is the absolute path *not* being passed through a rewrite rule but the 
other two requests are?
2) Can I change this behaviour from an .htaccess file?
3) If so, how?

With thanks,

Borden

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux