views:

28

answers:

1

Hello,

I have application in subfolder http://example.com/some/other/sub/folder/. And .htaccess file:

    RewriteEngine on    
    RewriteBase /some/other/sub/folder
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?p=$1 [QSA,L]

Template files contain absolute URL to the images, js and css files: /images/header.png, /js/common.js etc.

My problem is that static files with absolute paths is not accessible.

Thx.

A: 

The reason is that with a reference of an absolute URL path /images/header.png you actually reference /images/header.png and not /some/other/sub/folder/images/header.png.

Either use relative URL paths that work with /some/other/sub/folder/ as the base path. Or use absolute URL paths like /some/other/sub/folder/images/header.png that then are independent to the actual base path.

Gumbo
thanks a lot, but most easy solution that we found is move application to root of server;)
Andrey Gikalo