Re: RewriteRule exposing system directories

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

 



Vincent Bray schrieb:
On 13/12/2007, Samuel Vogel <samy-delux@xxxxxx> wrote:
I did that, but unfortunately it breaks something else, which worked
before. When a page in a subdirectory tried to get an image from an
directory relative to the docroot, that does not work anymore.
This can be seen here: http://tinyurl.com/37owgr

I'm not sure I understand the question but it sounds like you're
asking about why your relative links break when you change the path
relative to them.. So, don't do that :-)

When applying site-wide resources to html pages at
/any/depth/of/your/site it's best to make them /absolute/urls then
there's no confusion.
I don't understand why it worked beforehand with my insecure RewriteRule.
Also in my opinion mod_rewrite should/does not change the path, it just makes it appear different!?

For example, when I call "samy.domain.de/wbb" it works, but "wbb.domain.kilu.de/" it does not work. Rewriting looks like this now:

RewriteCond %{HTTP_HOST} !^www\.samy\.domain\.de
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+)\.samy\.domain\.de
RewriteRule (.*) %{DOCUMENT_ROOT}/%2/$1 [L]

Why does this break relative paths?

Regards,
Samy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-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