在php中htaccess重定向url后,无法加载css和js


can not load css and js after htaccess redirect url in php

我使用htaccess重定向我的url,并在.htaccess文件中使用此代码

RewriteEngine On
RewriteRule ^mobile?$ index.php
RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} '.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]
RewriteRule ^product/([0-9]+)/(.*)$ product.php?c=$1&title=$2 [QSA,L]
and also add this code in product.php 
<head> <base href="http://localhost/asp/" /> </head>

product.php文件中的代码。我重定向成功,但无法以正确的方式加载css和js。有人能建议我如何在product.php页面上加载css和js吗。我可以成功加载图像,但页面设计工作不正常。我已经搜索了很多,但没有得到正确的答案,请任何人都能提供对我有帮助的方式或代码。

如您所知,base的默认bahavior是替换相对地址之前的url(地址)。示例:

<base href="http://www.mywebsite.com/images/" target="_blank">

浏览器将在"中查找图像"html5.png"http://www.mywebsite.com/images/html5.gif".

希望它能帮助你!

创建一个主文件夹,然后将所有文件放入文件夹中,如下所示在此处输入图像描述。。。