Re: Issue with URL Rewriting

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

 



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 :
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/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.

--yvand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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