【发布时间】:2016-05-01 05:55:45
【问题描述】:
我正在将旧站点移植到新模板,并且遇到了Windows 2008 重写模块的问题。我正在尝试重写的链接如下所示:
http://ltweb2008.serveronline.net/product.php?pID=75
并调出页面就好了。然后我应用新的 URL 并加载正确的内容,但不再加载 模板的 style.css 文件。
http://ltweb2008.serveronline.net/product/75/any-text-here
问题似乎是制作模板(画布)的公司将主要的.css文件放在根目录中,但将其余所有文件加载到/css中。现在我无法使用 rewrite 加载主 .css 文件,当我将其移至 /css 时,它只显示一个 空白页,尽管当我查看页面源代码。
这样页面显示但不使用 style.css(重写):
<link rel="stylesheet" href="style.css" type="text/css" />
任何这些页面都是完全空白的(重写):
-
<link rel="stylesheet" href="/style.css" type="text/css" />或 -
<link rel="stylesheet" href="/css/style.css" type="text/css" />或 <link rel="stylesheet" href="http://ltweb2008.serveronline.net/style.css" type="text/css" />
我将这个用于模式:
^product/([0-9]+)/([^/]+)$
还有重写 URL:
/product.php?pID={R:1}
有人知道我错过了什么吗?
【问题讨论】: