问题
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