Hello,
For testing purposes I need to run site from /test_directory/, however every element in index.php and other places uses absolute path, e.g.:
/styles/style.css
/images/some_image.jpg
I was trying rewriting base to /test_directory/ but unfortunately instead of reading from:
www.mysite.com/test_directory/styles/style.css
PHP is reading from:
www.mysite.com/styles/style.css
where that file of course not exists.
I'm not familiar with RewriteBase, however I think it should work that way if I want change base dir to subdirectory.
So I need to change absolute path to every single file and every link.
Here we go with my .htaccess:
RewriteEngine On
RewriteBase /test_directory/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?var=$1 [QSA,L]
Any help will be appreciated.