Apache base URL for subdirectory?
I've got my site in htdocs/mysite which I'll be using to test/develop my website locally. Problem is, now all my URLs in my HTML/CSS need to begin with mysite whereas they won't on the product environment. What's the best way around this? Is there something I can add to httpd.conf to tell it anything 开发者_运维问答in mysite should be relative to mysite? I'm still an apache noob, so please by detailed :)
Can you not just omit the preceding slash on each file reference? i.e.,
.myClass {
background-image: url(images/stuff.png);
}
I'm guessing you want something more substantial. Use an .htaccess file in the /mysite directory. All the info you need is here: RewriteBase
加载中,请稍侯......
精彩评论