httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yvand <>
Subject Re: [users@httpd] Issue with URL Rewriting
Date Tue, 09 Jul 2013 22:02:17 GMT
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 
How can I redirect URL like /mysite/icon.png to /mysite/pictures/icon.png ?

I tried to adapt .htaccess file so :
> 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 
Indeed if I request /mysite/icon.png, the input of RewriteCond is

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message