【发布时间】:2011-03-16 21:51:01
【问题描述】:
内部网址:example.com/abc/xyz/rule.php?price=1&pass=2
外部网址:example.com/abc/xyz/rule/1/2
但是css、js文件在外部URL中没有生效。 我的 .htaccess 文件:
RewriteEngine On
RewriteBase /example.com/abc/
RewriteRule ^rule/([0-9]+)/([0-9]+)/?$ rule.php?price=$1&pass=$2
【问题讨论】:
-
请发布您的 .htaccess 的内容
-
ORIGINAL URL :example.com/abc/xyz/rule.php?price=1&pass=2 REWRITED TO :example.com/abc/xyz/rule/1/2 但是 css , js 文件在 REWRITED URL 中没有生效。我的 .htaccess 文件: RewriteBase 上的 RewriteEngine /example.com/abc/ RewriteRule ^rule/([0-9]+)/([0-9]+)/?$ rule.php?price=$1&pass=$2
-
请更新问题。
-
只是一个建议。这与其说是一个 PHP 问题,不如说是一个 Apache 问题。如果你这样标记它,你可能会得到更多的回应。 (如果您将
.htaccess文件格式化为代码也会有所帮助。
标签: url .htaccess mod-rewrite base-url