Re: Rewrite help

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

 



On Sat, Nov 8, 2008 at 11:26 AM, Craig Tataryn <craiger@xxxxxxxxxxx> wrote:
> Hi, I have the following rules setup:
>
> -----------------
> Alias /root-resources /Users/craiger/root-test
>
> RewriteEngine On
> RewriteRule ^/freshaire/images/(.*)$ /root-resources/images/$1 [L]
>
> RewriteRule ^/freshaire/community/images/(.*)$
> /root-resources/community-resources/images/$1 [L]
> -----------------
>
> Everything is fine if I navigate to:
> http://localhost/root-resources/community-resources/images/someimage.jpg
>
> But here I get a 404:
> http://localhost/freshaire/community/images/someimage.jpg


The second argument is a filesystem path, not a URL (unless you're
redirecting or proxying).

As a convenience, mod_rewrite will prepend your document root during
the substitution your stuff isn't under the docroot so it doesn't save
you here.  Have you tried using the full filesystem path in the 2nd
parameter of the RewriteRule?

RewriteRule ^/freshaire/images/(.*)$  /Users/craiger/root-test/$1 [L]


-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-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