Re: [users@httpd] Issue with URL Rewriting

2013-07-10 Thread yvand
Le 10/07/2013 00:18, Eric Covener a écrit : RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/mysite/pictures%{REQUEST_URI} -f RewriteRule ^(.+) /mysite/pictures/$1 [L] Unfortunately it doesn't work, because %{REQUEST_URI}contains also /mysite... Indeed if I request /mysite/icon.png, the input of Re

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread Eric Covener
>> RewriteEngine On >> RewriteCond %{DOCUMENT_ROOT}/mysite/pictures%{REQUEST_URI} -f >> RewriteRule ^(.+) /mysite/pictures/$1 [L] > > Unfortunately it doesn't work, because %{REQUEST_URI}contains also > /mysite... > Indeed if I request /mysite/icon.png, the input of RewriteCond is > '/home/yvan

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 :

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
Thank you Vincenzo D'Amore for helping me. It is quite weird... In your log it seems there isn't the rewritecond part... Which rewriteloglevel have you enabled? I used rewriteloglevel 3. I changed it to 8 and noticed that it doesn't match as I expected ! With this htaccess : RewriteEngine O

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread Vincenzo D'Amore
It is quite weird... In your log it seems there isn't the rewritecond part... Which rewriteloglevel have you enabled? 2013/7/9 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

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread Vincenzo D'Amore
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 > Hi all, > > I want to redirect all requests like /icon.png to /picture

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/ww

Re: [users@httpd] Issue with URL Rewriting

2013-07-09 Thread Jens-U. Mozdzen
Hi yvand, Zitat von yvand : 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_FILENAM

[users@httpd] Issue with URL Rewriting

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