开发者

mod_rewrite and htaccess

I have set up a few rules based on other questions but now my css breaks

I did have the URL /

/eshop/cart.php?products_id=bla 

and everything 开发者_StackOverflowwork fine. but now with my mod rewrite url-

/product/product-title/ 

It loose the base directory. Is there an option to fix this? So i dont have to go back with the full url in all the img src tags and so on?


always use absolute path when link to the server resources
web-server's absolute path always starts from the /
So /css/style.css will never fail (it must be the real path of course)


Yes, I ran into this also when I started using rewritten paths. You can define the base directory in the code or just use absolute paths.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜