使用动态php解决方案使用url重写后,如何加载图像和css和js不加载

时间:2014-07-15 16:21:18

标签: php css .htaccess mod-rewrite path

RewriteRule ^fpd/([^/]+)/?$ /sites/all/themes/chapboo_2014/fpd/$1.php [L,NC]重写url后,css,js和图片未加载到页面中。 我知道这是因为网址重写。

echo getcwd();并且它返回public_html/sites/all/themes/chapboo_2014/fpd但没有正确加载,我该如何解决此问题? 我的页面有几个文件和图像,可能有300个图像,我更喜欢好的解决方案,直到我更改并使用文件路径中的绝对路径 感谢任何帮助

我路径的例子

 <!-- Style sheets -->
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <link rel="stylesheet" type="text/css" href="css/plugins.min.css" />
    <img src="images/designs/retro_1.png" title="Retro One" data-parameters='{"x": 210, "y": 200, "colors": "#000000", "removable": true, "draggable": true, "rotatable": true, "resizable": true, "scale": 0.25, "price": 7, "boundingBox": "Base", "autoCenter": true}' />
                        <img src="images/designs/retro_2.png" title="Retro Two" data-parameters='{"x": 193, "y": 180, "colors": "#ffffff", "removable": true, "draggable": true, "rotatable": true, "resizable": true, "scale": 0.46, "boundingBox": "Base", "autoCenter": true}' />
                        <img src="images/designs/retro_3.png" title="Retro Three" data-parameters='{"x": 240, "y": 200, "colors": "#000000", "removable": true, "draggable": true, "rotatable": true, "resizable": true, "scale": 0.25, "price": 8, "boundingBox": "Base", "autoCenter": true}' />

我看到了这个解决方案how can I load image and css and js not load after using url rewrite with dynamic php solution但它通过静态答案回答,我的页面中有足够的文件,也许它需要php解决方案,更改direcotry或其他东西

0 个答案:

没有答案