RewriteRule - html broken - Like missing css

我们两清 提交于 2019-12-20 04:12:58

问题


I have problem with this rule:

RewriteRule ^([^/]+)/(\d+)$ more.php?books=$1&tags=$2 [L]

After this rule everything works but page is displayed incorrectly. Like missing css.

Thanks in advance


回答1:


This might happen, when you have a relative URL to your CSS files. If you access the URL /book-name/2 and have a link to css/style.css, for example, the browser will resolve this to /book-name/css/style.css.

Change your CSS links to absolute URLs, like /css/style.css, and you should be fine.



来源:https://stackoverflow.com/questions/15084122/rewriterule-html-broken-like-missing-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!