.htaccess File Causing JS and CSS Files From Being Called
I have an .htaccess file working in my website. I found out that javascript and CSS files are not called if the path of each of these files are not set to absolute. I changed all the URL paths to absolute in my smarty template and javascript files, and not it's working.
Now in for my php files, I have require_once all over many php files. I开发者_JAVA技巧 was just wondering if I also have to set the paths in the require_once to absolute? Any help is appreciated. Thanks.
require_once
takes physical paths on disk, which are not affected by .htaccess
.
In your .htaccess
file, above your RewriteRule
directive, try the following two lines:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
That'll stop the rewrite rules coming into affect if the request is actually a file (f
) or directory (d
).
精彩评论