httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo D'Amore" <v.dam...@gmail.com>
Subject Re: [users@httpd] Issue with URL Rewriting
Date Tue, 09 Jul 2013 13:55:56 GMT
Hi yvand,

may be because if you request /icon.png the first RewriteCond cannot find
the correct path.
Please try fix the rewritecond with this:

RewriteCond %{DOCUMENT_ROOT}/pictures%{REQUEST_FILENAME} -f




2013/7/9 yvand <yvand.sword@gmail.com>

> Hi all,
>
> I want to redirect all requests like /icon.png to /pictures/icon.png, if
> the file exists in the pictures folder.
> It seems really trivial but I didn't manage to set up.
>
> Here is my .htaccess :
>     RewriteEngine On
>     RewriteCond /pictures/%{REQUEST_FILENAME} -f
>     RewriteRule ^(.+) /pictures/$1 [L]
>
> If I request /pictures/icon.png it works, but if I request /icon.png I get
> a 404 error.
>
> What is wrong with my .htaccess?
>
> Regards.
>
> PS : Sorry for my bad english
>
> --yvand
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@httpd.**apache.org<users-unsubscribe@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Vincenzo D'Amore
email: v.damore@gmail.com
skype: free.dev
mobile: +39 349 8513251

Mime
View raw message