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.
精彩评论