Re: [users@httpd] Issue with URL Rewriting

2013-07-10 Thread yvand
of RewriteCond is '/home/yvand/www/mysite/pictures/mysite/icon.png' My question is how can I access to the URI in RewriteCond? When I say URI I do not mean REQUEST_URI but just icon.png in my example, which is the value used by RewriteRule. Since you captured it, it's $1 in the RewriteCond. I

[users@httpd] Issue with URL Rewriting

2013-07-09 Thread yvand
^(.+) /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-unsubscr

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread yvand
Thank you Jens-U. for your help. I enabled log for URL rewriting, here is what I get if I request /icon.png (DocumentRoot = /home/yvand/www) 127.0.0.1 - - [09/Jul/2013:14:41:28 +0200] [localhost/sid#f884e0][rid#11f2bc0/initial] (3) [perdir /home/yvand/www/] strip per-dir prefix: /home/yvand

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread yvand
On RewriteCond /pictures/%{REQUEST_FILENAME} -f RewriteRule ^(.+) /pictures/$1 [L] I got : 127.0.0.1 - - [09/Jul/2013:16:04:36 +0200] [localhost/sid#e454e0][rid#10afbb0/initial] (3) [perdir /home/yvand/www/] strip per-dir prefix: /home/yvand/www/icon.png - icon.png 127.0.0.1 - - [09/Jul/2013:16

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread yvand
It works fine with this RewriteCond : RewriteCond %{DOCUMENT_ROOT}/pictures%{REQUEST_URI} -f Thank you all for your help! --yvand - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread yvand
I got a new question. Imagine my website is in a subfolder of document root's directory. For example, document root is /home/yvand/www, and my website is in /home/yvand/www/mysite. How can I redirect URL like /mysite/icon.png to /mysite/pictures/icon.png ? I tried to adapt .htaccess file so