Re: Apache's .htaccess issue with absolute addressing

From: Date: Tue, 29 Nov 2011 18:48:07 +0000
Subject: Re: Apache's .htaccess issue with absolute addressing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-315879@lists.php.net to get a copy of this message
Grega Leskovšek <legrega@gmail.com> wrote: > That is problem on my skavt.net server, but also an issue of knowledge. > I need to access my css/js/pic files with absolute addressing(starting > with /) I can do this on my home server if I start from /var/www and > not from /var/www/peace-refuge/, but when I upload to skavt.net server > in the www/ (my root dir) the thing doesn't work any more. > What do I need to write in .htaccess file in base dir > to mark for example /www/ is base dir and when accessing a file with /my.css > will look in /www/my.css address and not in somewhere else I do not > where and I do not know how to figure that out? > > I tried this > RewriteBase /www/ > writing in the file /www/.htaccess > > but it doesn’t work. Please help me! Thanks in advance, Grega from Slovenia If /var/www is your DocumentRoot in your httpd.conf file, the above won't work. If your application is rooted at /var/www, then you don't need any rewrite rules to get /my.css to work if it is already in the DocumentRoot for the site.

« previous php.general (#315879) next »