Skip to main content

Thread: Apache rewrites not using file-system path


in apache2.conf have
code:
<locationmatch "favicon.ico$">  rewriteengine on  rewritecond %{request_filename} !-f  rewriterule .* /img-sys/favicon.ico  </locationmatch>
and have several virtualhosts.

according apache docs
mod_rewrite tries guess whether have specified file-system path or url-path checking see if first segment of path exists @ root of file-system. example, if specify substitution string of /www/file.html, treated url-path unless directory named www exists @ root or file-system, in case treated file-system path.
/img-sys/favicon.ico exist, yet requests non-existent favicon being rewritten document_root/img-sys/favicon.ico. not exist, gets stuck in rewrite loop:

127.0.0.1 - - [13/dec/2011:10:22:58 +0000] [www.domain.can/sid#21b834a8][rid#21d6e028/initial] (2) [perdir favicon.ico$/] rewrite '/home/djeyewater/webapps/htdocs/domain.com/files/favicon.ico' -> '/img-sys/favicon.ico'
127.0.0.1 - - [13/dec/2011:10:22:58 +0000] [www.domain.can/sid#21b834a8][rid#21d6e028/initial] (1) [perdir favicon.ico$/] internal redirect /img-sys/favicon.ico [internal redirect]
127.0.0.1 - - [13/dec/2011:10:22:58 +0000] [www.domain.can/sid#21b834a8][rid#21d844f8/initial/redir#1] (2) [perdir favicon.ico$/] rewrite '/home/djeyewater/webapps/htdocs/domain.com/img-sys/favicon.ico' -> '/img-sys/favicon.ico'
so apache rewriting relative document_root, when should using file-system path. did find ubuntu , debian bug report problem, both reports had people saying worked okay, , had been closed.

version apache/2.2.14 (ubuntu)

ideas?

thanks

dave



Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] Apache rewrites not using file-system path


Ubuntu

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support